jquery - Prototype code not working when jQuyery library is loaded on top -


my prototype code no longer works when load in jquery library, though jquery first library loaded.

the html of page looks bit so:

<head> ... <script type="text/javascript" src="/js/jquery.min.js"></script> <script type="text/javascript" src="/js/effects.js"></script> <script type="text/javascript" src="/js/prototip.js"></script> <script type="text/javascript" src="/js/dragdrop.js"></script> <script type="text/javascript" src="/js/default.js"></script> <script type="text/javascript" src="/js/limitfocus.js"></script> ... </head>  <body>  <input type="radio" name="useotheraddress" id="useotheraddress_y" value="y" onclick="selectaddress()"> <input type="radio" name="useotheraddress" id="useotheraddress_n" value="y" onclick="selectaddress()">  <div id="myaddress" style="display: none;"> ... </div>  <script type="text/javascript">   // piece of protptype code no longer working    function selectaddress () {     var t = $('myaddress');     if ($('useotheraddress_n').checked) {       effect.appear(t);       return;     }     t.hide();   } </script> 

anybody have ideas? page:

http://docs.jquery.com/using_jquery_with_other_libraries

suggests loading jquery first should make handy-dandy. it's not :[

you need call jquery.noconflict(), this:

jquery.noconflict(); //or possibly $j = jquery.noconflict(); function selectaddress () { 

then load jquery last (but before it's plugins) jquery.noconflict() restore $ previous value (prototype).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -