TypeError: e.fn.cycle is undefined - Jquery cycle 2 - jquery-cycle2

Get this console error when trying to implement JQuery Cycle2:
TypeError: e.fn.cycle is undefined
<script type="text/javascript" src="jQuery1.7.1.js"></script>
<script type="text/javascript" src="margaretha/js/jquery.cycle2.carousel.min.js"></script>
<script type="text/javascript" src="margaretha/js/jquery.cycle2.min.js"></script>
What could be wrong here?

The order of your javascripts maybe? "jquery.cycle2.min.js" should be included before "jquery.cycle2.carousel.min.js".

Related

Mixing and Matching Components for Zurb Foundation 6 Sites & Apps

Is it possible to mix and match components for Zurb Foundation 6 for Sites/Apps? For example, can I use the the Card component of Zurb Foundation 6 for Apps in a Foundation 6 for Sites installation?
If so, how is this possible?
Its is very much possible and I've been using them in my works. Simply make sure to include appropriate css and js files.
For example :
<!--Scripts-->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/foundation.min.js"></script>
<script type="text/javascript" src="js/foundation-apps.min.js"></script>
<script type="text/javascript" src="js/foundation.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script>
<script type="text/javascript" src="js/iconic.min.js"></script>
<script type="text/javascript" src="js/motion-ui.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<!--Styles-->
<link rel="stylesheet" href="css/foundation-apps.min.css"/>
<link rel="stylesheet" href="css/foundation.min.css"/>
<link rel="stylesheet" href="css/motion-ui.min.css"/>
<link rel="stylesheet" href="css/app.css"/>
You this for local development and if you want, you can compress all files into one minified (.min) file for production.

Django tinyMCE is not defined

I'm working on adding tinyMCE to the admin change_form and returning the error:
Uncaught ReferenceError: tinyMCE is not defined
It looks like the source has loaded correctly in the developer tools. I'm not sure what's causing the error.
From change_form.html
{{ media }}
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/tinymce/4.1.6/jquery.tinymce.min.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
theme: "simple"
});
</script>

django url encode issue in using mathjax

I wanna add mathjax script into my template
</script>
<script type="text/javascript" src="{% static "MathJax-2.4-latest/MathJax.js?config=TeX-AMS_HTML-full.js" %}"></script>
But django encode '?' to '%3F' and '=' to '%3D'(In firefox console), So I get a incorrect url. If I use "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
as my "src" attribution value, it's correct. And firefix console can show '?' and '=' correctly.
Okay, I solved the problem myself. It should place "?config=xxx" out of "%}". It looks like
<script type="text/javascript" src="{% static "MathJax-2.4-latest/MathJax.js" %}?config=TeX-AMS_HTML-full">
</script>

Kendo controls render in Debug mode only

I have created a MVC 3 site using Kendo. When I go into Debug mode the Kendo controls render with no problem. When I public the project to my IIS7 server the controls do not render. Here is what I have in the layout file to reference the kendo javascript files and other javascript files.
<script src="#Url.Content("~/Scripts/common.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/json2.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/jquery.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.web.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.aspnetmvc.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.culture.en-US.min.js")" type="text/javascript"></script>

using tinymce wih django admin panel

I am trying to integrate tinymce with django using these steps, however I can't. All I see in my admin panel is a simple TextField.
It seems there is something wrong with my settings.py file because in the code of the admin page I get this:
<script type="text/javascript">window.__admin_media_prefix__ = "/static/admin/";</script>
<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.min.js"></script>
<script type="text/javascript" src="/static/tiny_mce/tiny_mce.js"></script>
Shouldn't tiny_mce.js source file exist in static/admin directory? What am I doing wrong?
First - look at this code throught Firebug (or something else, as you wish), maybe .js code doesn't linked with that page, then you will see 404 page there. Also, if everything correct you must check javascript errors, maybe there some dependencies fails.
And I'm sure, that you connect all needed code inn your .py files.