/ Published in: jQuery
Hello,
I have been developing with jQuery for just over a year now, I thought I would share something with you that I have found pretty time saving over the past few months.
If you have ever had javascript conflicts due to several different javascript libraries being used you will understand the need for using this method.
Rather than using the documented $(document).ready method of starting any javascript functionality on document load. I recommend that you give the alternative shown below. This is due to the common conflict between Javascript libraries using the $ symbol. By writing your document ready in this way, any $ symbols within this declaration will be ignored by all other javascript libraries.
Meaning you will no longer need to use the no conflict method of solving the same problem
I have been developing with jQuery for just over a year now, I thought I would share something with you that I have found pretty time saving over the past few months.
If you have ever had javascript conflicts due to several different javascript libraries being used you will understand the need for using this method.
Rather than using the documented $(document).ready method of starting any javascript functionality on document load. I recommend that you give the alternative shown below. This is due to the common conflict between Javascript libraries using the $ symbol. By writing your document ready in this way, any $ symbols within this declaration will be ignored by all other javascript libraries.
Meaning you will no longer need to use the no conflict method of solving the same problem
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery(function( $ ){ //Insert your javascript code here });
URL: http://www.michaeltempest.com