[jQuery] Conflict with Mootools...
I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. I need help. Can someone show me how to use the "noconflict" script. Many thanks. Erik
[jQuery] Re: New link being ignored by jQuery
I did check it out... It still doesn't work. All of the scripts in div tags, both Mootools and jquery... Need help.. Erik On Jan 19, 2009, at 4:47 PM, Karl Rudd wrote: Check out the documentation for several solutions: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_..._.3F Karl Rudd On Tue, Jan 20, 2009 at 5:14 AM, Mark MacInnes wrote: I'm using jQuery to perform some ajax when a link with a certain id is clicked on. The ajax updates a database record and then it replaces the 'a' tag with a new one. This all works fine. The new 'a' tag has the same id as the old one, but text and some other properties on it change. It's the id that activates the jQuery functionality. When the old 'a' tag is replaced with the new one the jQuery that should operate doesn't work. I understand that this is because the new 'a' tag has been added after the page loaded so jQuery doesn't know to fire when it's clicked on. Is there anything I can do that will force jQuery to fire when the new 'a' tag is clicked? I suspect this has probably been answered a million times, but I don't just can't find the right search terms.
[jQuery] Re: Conflict with Mootools...
Good question.. I'll fix that... Can you give me the script to fix the conflict? Erik On Jan 19, 2009, at 4:43 PM, MorningZ wrote: How come you are including both 1.2.3 and 1.2.6 versions of jQuery? On Jan 19, 4:40 pm, "Erik R. Peterson" wrote: I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. I need help. Can someone show me how to use the "noconflict" script. Many thanks. Erik
[jQuery] Re: Conflict with Mootools...
Thank you. I read as you instructed me and I'm still confused. My first question, is there one script i can place in the header that will eliminate the conflict? I actually read Using jQuery with Other Libraries I understand the problem, but still having problems with the fix. Can there be one script placed in the head of the page that will eliminate all the conflicts with different scripts? var $j = jQuery.noConflict(); Thanks for your help. Erik On Jan 19, 2009, at 5:16 PM, MorningZ wrote: ps... reading your post for the 4th time, i realize now that the first two files are probably not related to jQuery hence they'd be safe anyways, show some code where you are trying to use jQuery and trying to initialize your HTML to use the plugins you need that would make it easier for others to help you On Jan 19, 5:11 pm, MorningZ wrote: Rather than just myself or someone else posting what *probably* would work... how about some work to help understand what's going on? First off, make sure to read the link Karl posted... Secondly, before you do *anything* jQuery related, you want to include the library first.. you've got 3 or 4 include files that need jQuery before you even load jQuery... that would be the reason why your code doesn't work Third, and related to "First", you want to set the ".noConflict" as soon as you can so your code is consistently using the same methods for using jQuery On Jan 19, 5:05 pm, "Erik R. Peterson" wrote: Good question.. I'll fix that... Can you give me the script to fix the conflict? Erik On Jan 19, 2009, at 4:43 PM, MorningZ wrote: How come you are including both 1.2.3 and 1.2.6 versions of jQuery? On Jan 19, 4:40 pm, "Erik R. Peterson" wrote: I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. </ </tt><tt>script> </tt><tt><script type="text/javascript" src="/src/js/slideshow.js"></ </tt><tt>script> </tt><pre style="margin: 0em;"> <script type="text/javascript" src="/src/js/jquery/lavalamp/ jquery-1.2.3.min.js"> barack/barackslideshow.js"> barack/demo.js"> 1.2.1/core.js"> 1.2.1/more.js"> barack/morphlist.js"> I need help. Can someone show me how to use the "noconflict" script. Many thanks. Erik
[jQuery] Re: Conflict with Mootools...
Thank you so much!! Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: Hi Erik, If you are using the jQuery.noConflict function and set the jQuery Selector variable to $j as in: var $j = jQuery.noConflict(); You need to make sure you go through all your jQuery code and change the $() selector to $j() or whatever you set the variable to. Also note note you need to make sure you aren't using $j in any of your mootools code as well. Good luck, Steve On Jan 19, 5:35 pm, "Erik R. Peterson" wrote: Thank you. I read as you instructed me and I'm still confused. My first question, is there one script i can place in the header that will eliminate the conflict? I actually read Using jQuery with Other Libraries I understand the problem, but still having problems with the fix. Can there be one script placed in the head of the page that will eliminate all the conflicts with different scripts? var $j = jQuery.noConflict(); Thanks for your help. Erik On Jan 19, 2009, at 5:16 PM, MorningZ wrote: ps... reading your post for the 4th time, i realize now that the first two files are probably not related to jQuery hence they'd be safe anyways, show some code where you are trying to use jQuery and trying to initialize your HTML to use the plugins you need that would make it easier for others to help you On Jan 19, 5:11 pm, MorningZ wrote: Rather than just myself or someone else posting what *probably* would work... how about some work to help understand what's going on? First off, make sure to read the link Karl posted... Secondly, before you do *anything* jQuery related, you want to include the library first.. you've got 3 or 4 include files that need jQuery before you even load jQuery... that would be the reason why your code doesn't work Third, and related to "First", you want to set the ".noConflict" as soon as you can so your code is consistently using the same methods for using jQuery On Jan 19, 5:05 pm, "Erik R. Peterson" wrote: Good question.. I'll fix that... Can you give me the script to fix the conflict? Erik On Jan 19, 2009, at 4:43 PM, MorningZ wrote: How come you are including both 1.2.3 and 1.2.6 versions of jQuery? On Jan 19, 4:40 pm, "Erik R. Peterson" wrote: I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. I need help. Can someone show me how to use the "noconflict" script. Many thanks. Erik
[jQuery] Re: Conflict with Mootools...
I did everything you pointed out. It still doesn't work: var $j = jQuery.noConflict(); Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j
[jQuery] Re: Conflict with Mootools...
Here is my code: $(document).ready(function(){ $(":text").labelify(); }); $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 800, click: function(event, menuItem) { return false; } }); }); function change(id,newtext) { document.getElementById(id).innerHTML=newtext } On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: I did everything you pointed out. It still doesn't work: var $j = jQuery.noConflict(); Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j
[jQuery] Re: Conflict with Mootools...
Here all my jquery scripts in my head: I went through all these scripts and replaced $( with $j(. I also changed the following script in my head: $(document).ready(function(){ $(":text").labelify(); }); $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 800, click: function(event, menuItem) { return false; } }); }); Next, do I place var $j = </tt><tt>jQuery.noConflict(); at the bottom of my head? I did this and still no success. Erik On Jan 20, 2009, at 1:37 PM, Steven Barbera wrote: Which part of the code are you using jQuery with? Because at the very top after you call the jQuery script you should set the var $j = jQuery.noConflict() method. In then in front of all the jQuery code $ selectors change them to $j, so jQuery code will be applied to them. On Tue, Jan 20, 2009 at 1:35 PM, Erik R. Peterson wrote: Here is my code: $(document).ready(function(){ $(":text").labelify(); }); $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 800, click: function(event, menuItem) { return false; } }); }); function change(id,newtext) { document.getElementById(id).innerHTML=newtext } On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: > > I did everything you pointed out. It still doesn't work: > >
[jQuery] Re: Conflict with Mootools...
I eliminated some unnecessary scripts. This is what i have now: script>