jquery - Fancybox v2.1.4 does not work - $ is not defined -


i wanted replace older version of fancybox new v2.1.4. unfortunately, not work. error:

referenceerror: $ not defined 

any ideas?

<script type="text/javascript" src="http://static.mydomain.com/scripts/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="http://static.mydomain.com/scripts/fancybox/fancybox.js"></script>  <a class="oforms" href="/my/forms/form.php?id=10">open form 10</a> 

script file:

jquery(function($){$(document).ready(function(){ $(".oforms").fancybox({ 'autodimensions': true, 'transitionin': 'none', 'transitionout': 'none', 'oncomplete': function() {$("#fancybox-inner").css({'overflow-x':'hidden'});},  'ajax' : { cache : false }}); .............. .............. })}); 

if planing upgrade version, have upgrade api options too. options in v2.x new , not compatible previous versions.

also need specify type of content try script (i commented out old options) :

jquery(document).ready(function ($) {     $(".oforms").fancybox({         autosize: true, // 'autodimensions': true,         openeffect: "none", //'transitionin': 'none',         closeeffect: "none", // 'transitionout': 'none',     // 'oncomplete': function() {$("#fancybox-inner").css({'overflow-x':'hidden'});},          aftershow: function () {             // function             // may not need mess overflow, use scrolling instead         },         type: "ajax",         ajax: {             cache: false         }     }); }); 

check documentation complete set of options v2.x.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -