Today i am gonna deal with a topic which had been troubled many times in past one year.I am a web developer.So when i want to use jQuery effects for slider,validation,sliding forms etc.So when i write for,some functionality doesn’t work due to jQuery conflict.Today at very first morning, i got a solution which is permanent and perfect in all aspects.
Please follow these steps to avoid jQuery conflicts on your site:-
1. First of all try out this code:-
<script type=”text/javascript”>
jQuery.noConflict();
jQuery(document).ready(function(jQuery) {
// Code that uses jQuery’s $ can follow here.Please write code using jQuery not $
});
</script>
2. Remember this point:- If you are using latest jquery.js then use jQuery instead of $ otherwise use $.Because older jquery js files used to use $ and newer js files having jQuery.
3. Now Above two are common solution,those can be found after google it out.
4. Now if your problem still exists, then use this trick:-
For WordPress User,include your jQuery js files before <?php wp_head(); ?> like this:-
<?php
$wp_page_no=7;
if(is_page($wp_page_no))
{
wp_deregister_script( ‘jquery’ );
wp_register_script( ‘jquery’, “http://www.aviontechnologyinc.com/wp-content/themes/Aviontechnology/js/jquery.js); //first js
wp_enqueue_script( ‘jquery’ );
wp_deregister_script( ‘jquery’ );
wp_register_script( ‘jquery’, “http://code.jquery.com/jquery-1.4.4.min.js); //second js
wp_enqueue_script( ‘jquery’ );
}
//So these js will be load for only page no.7 not all pages.
?>
5. Important Part: Now open these two js files and replace $ with jQuery and save these two.and run your website.
Thnx for sharing shyam.
Thanks and stay tune for more
I simply want to mention I am just new to blogging and definitely liked your web page. Most likely I’m want to bookmark your blog . You definitely come with very good article content. Bless you for revealing your web-site.
Dude I just love Jennifer Aniston
Thanks and stay tune for more
What are the norms of copyright of web content? How’s it different from Patent?
How can i migrate from Joomla to WordPress together with all my posts?
very nice publish, i definitely love this web site, keep on it
wonderful post, very informative. I ponder why the opposite specialists of this sector don’t realize this. You must continue your writing. I’m sure, you’ve a huge readers’ base already!
Very nice article, exactly what I wanted to find.
Does your website have a contact page? I’m having trouble locating it but, I’d
like to send you an email. I’ve got some suggestions for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time.
Hi there! This article could not be written any better! Looking at this article reminds me of my previous roommate! He continually kept talking about this. I most certainly will forward this information to him. Pretty sure he’ll have a good read. I appreciate you for sharing!|
It’s an awesome piece of writing in support of all the web visitors; they will take benefit from it I am sure.
Thanks and stay tune for more