<p>We are planning to use the jQuery library to augment our client side JavaScript needs. </p>

<p>Are there any major issues in trying to use both ASP.Net AJAX and jQuery? Both libraries seem to use $ for special purposes. Are there any conflicts that we need to be aware of? </p>

<p>We also use Telerik controls that use ASP.Net AJAX.</p>

<p>TIA</p>

[{'answer_id': 65208, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>jQuery has a noConflict() method as a part of the core, but it then requires that you either use jQuery as your named function or something else of your choosing (instead of the dollar selector). However, I will say that the method is often dependent on the implementation of the "competing" library. I have tried to use it for a Ning social network (which used Dojo), and for Magento (which uses Prototype), and I could not get either to play right with jQuery. This is just my personal experience, and others have been very successful.</p>\n\n<p><a href="http://docs.jquery.com/Core/jQuery.noConflict" rel="nofollow noreferrer">http://docs.jquery.com/Core/jQuery.noConflict</a></p>\n'}, {'answer_id': 65574, 'author': 'BlackTigerX', 'author_id': 8411, 'author_profile': 'https://Stackoverflow.com/users/8411', 'pm_score': 4, 'selected': True, 'text': "<p>We have used ASP.NET Ajax, jQuery and Telerik components on a large project for quite a while and haven't had any issues</p>\n\n<p>I would definitely recommend using jQuery</p>\n"}, {'answer_id': 67722, 'author': 'Euro Micelli', 'author_id': 2230, 'author_profile': 'https://Stackoverflow.com/users/2230', 'pm_score': 2, 'selected': False, 'text': '<p>The developers of ASP.NET Ajax took specific steps to make sure that the library could be used in conjunction with jQuery.</p>\n\n<p>For example, the ATLAS CTP (the beta which became ASP.NET Atlas) used to have a $() function, but it was removed and replaced with $get().</p>\n'}, {'answer_id': 67754, 'author': 'Chris James', 'author_id': 3193, 'author_profile': 'https://Stackoverflow.com/users/3193', 'pm_score': 1, 'selected': False, 'text': '<p>I have been using ext which is another javascript framework with .net. It is far easier to use than old fashioned HTML form controls</p>\n\n<pre><code>&lt;input type="text" id="whatever" /&gt;\n</code></pre>\n\n<p>Than using ASP.net form controls. You probably want to use the cool javascript framework form validation as opposed to the not so great built in .net validators too, but I guess that\'s down to your preference</p>\n\n<p>If you do want to carry on using .net controls, remember that the ID generated in markup is different to what you define, so if you want to reference a control by id in JS use:</p>\n\n<pre><code>&lt;%=MyControlId.ClientID%&gt;\n</code></pre>\n'}, {'answer_id': 67907, 'author': 'gregmac', 'author_id': 7913, 'author_profile': 'https://Stackoverflow.com/users/7913', 'pm_score': 2, 'selected': False, 'text': '<p>One downside is that server side controls can get renamed, depending on their containers. For example, you might have:</p>\n\n<pre><code>&lt;asp:panel id="panel1" runat="server"&gt;&lt;/asp:panel&gt;\n</code></pre>\n\n<p>This may be rendered to the page as:</p>\n\n<pre><code>&lt;div id="ctl00$panel1"&gt;&lt;/div&gt;\n</code></pre>\n\n<p>So if you write jQuery using <code>$(\'#panel1\')</code> as a selector, it won\'t work. The way around this is to generate the id dynamically, eg:</p>\n\n<pre><code> Dim js as String = "$(\'" &amp; panel1.ClientID &amp; "\').whatever();"\n</code></pre>\n\n<p>This can make the javascript a bit unreadable, but it does work quite well. I work on a large web app using this method, and jQuery has saved us a TON of time, not to mention making the site look and work much better.</p>\n'}, {'answer_id': 78207, 'author': 'Dave Ward', 'author_id': 60, 'author_profile': 'https://Stackoverflow.com/users/60', 'pm_score': 2, 'selected': False, 'text': '<p>For what it\'s worth, there is no conflict between jQuery\'s $ function and ASP.NET AJAX\'s $ prefixed shortcut functions ($get, $find, $create, etc).  Just the same as using a variable <strong>f</strong> doesn\'t prevent you from using a variable named <strong>f</strong>oo.</p>\n\n<p>jQuery and ASP.NET AJAX work well together in the majority of cases.  In the past year, the only time I\'ve seen ASP.NET AJAX break jQuery code was <a href="http://forums.asp.net/t/1313299.aspx" rel="nofollow noreferrer">this scenario with jDrawer</a>.  The workaround wasn\'t bad though.</p>\n'}, {'answer_id': 150714, 'author': 'Euro Micelli', 'author_id': 2230, 'author_profile': 'https://Stackoverflow.com/users/2230', 'pm_score': 1, 'selected': False, 'text': '<p>A recent development related to this question:</p>\n\n<p>Scott Guthrie posted on September 28th 2008 (see: <a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" rel="nofollow noreferrer">http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx</a>) that Microsoft will actually <strong>begin shipping JQuery with Visual Studio</strong>. MVC projects will include the library by default. Scott indicates that this is being done with the consent and encouragement of the JQuery team.</p>\n\n<p>See the original post for <a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" rel="nofollow noreferrer">full details</a>.</p>\n'}, {'answer_id': 312413, 'author': 'Morten Bergfall', 'author_id': 447694, 'author_profile': 'https://Stackoverflow.com/users/447694', 'pm_score': 1, 'selected': False, 'text': '<p>Apparently, Telerik has begun adding jQuery to some of their RadControls, starting from release Q3.</p>\n\n<p>I use both jQuery and RadControls, but haven\'t had the time to look any further into this entanglement...could swing both ways....<br>\nI have an omnius feeling that this entails more clusterf***, but that\'s just based on general experience with some of this and a little bit of that ;-)</p>\n\n<p>Check out Atanas Korchev\'s blog at Telerik on just this subject :<br>\n<a href="http://blogs.telerik.com/AtanasKorchev/Posts/08-11-06/ASP_NET_Ajax_Controls_and_jQuery.aspx" rel="nofollow noreferrer">http://blogs.telerik.com/AtanasKorchev/Posts/08-11-06/ASP_NET_Ajax_Controls_and_jQuery.aspx</a></p>\n\n<p>and the best of luck to us all when MS, jQuery, Telerik, JP Morgan and McDonalds all mingle and mash upon our desktops... ;-)</p>\n'}, {'answer_id': 550029, 'author': 'BeaverProj', 'author_id': 32908, 'author_profile': 'https://Stackoverflow.com/users/32908', 'pm_score': 1, 'selected': False, 'text': "<p>I've used jQuery with ASP.NET Ajax as they both do different things well.  I've never had an issue with using the two together.  In fact, I get around the wierd ASP.NET id mishmash by using the super powerful jQuery selectors.  By being able to select classes and sub-elements of elements (basically CSS) it makes it very easy to use.</p>\n"}]
['https://Stackoverflow.com/questions/65129', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3635/']