Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




ASP.NET JQuery interview questions with answers on Noconflict

What is jQuery.noConflict

Let say we have an old maintenance project with us and now we want to include jQuery into it.

What is the problem?
Project contain a JavaScript library which contain global function called $. This situation will create a conflict because both jQuery and one of the previous library contain $ function and obviously one of them is going to overridden.
 
What is the solution?
 
Now in order to overcome such situation jQuery has introduced jQuery.noConflict
var  # = jQuery.noConflict();
// Use jQuery via jQuery(...)
#(document).ready( function  ()
{
    #( "div" ).fadeIn();
});

Helpful Website Url
http://www.questpond.com
Share this article   |    Print    |    Article read by 1797 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question