ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. All rights reserved.Error: $ is not a function in ASP.Net MVC<p>&nbsp;</p> <blockquote><cite>GuruLogu says:</cite> <div class="line number11 index10 alt2"><code class="html plain">jquery('#comp_duty').click(function () {</code></div> <div class="line number12 index11 alt1">&nbsp;</div> <div class="line number13 index12 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">debugger;</code></div> <div class="line number14 index13 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var bookingid = jquery('#b_id').val();</code></div> <div class="line number15 index14 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var distance = jquery('#dis').val();</code></div> <div class="line number16 index15 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var fare = jquery('#far').val();</code></div> <div class="line number17 index16 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var tripminutes = jquery('#t_min').val();</code></div> <div class="line number18 index17 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">//alert(distance);</code></div> <div class="line number19 index18 alt2">&nbsp;</div> <div class="line number20 index19 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">Url.Action("CompleteTrip", "NewBooking", new { bookid: bookingid, distance: distance, fare: fare, tripminutes: tripminutes });</code></div> <div class="line number21 index20 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">});</code></div> </blockquote> <p>Replace with the below code and check.</p> <pre class="brush: js">jQuery(function(){ jQuery(&#39;#comp_duty&#39;).click(function () { var bookingid = jQuery(&#39;#b_id&#39;).val(); var distance = jQuery(&#39;#dis&#39;).val(); var fare = jQuery(&#39;#far&#39;).val(); var tripminutes = jQuery(&#39;#t_min&#39;).val(); //alert(distance); Url.Action(&#34;CompleteTrip&#34;, &#34;NewBooking&#34;, new { bookid: bookingid, distance: distance, fare: fare, tripminutes: tripminutes }); }); });</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/603487/Error-is-not-a-function-in-ASPNet-MVC/http://www.aspforums.net/Threads/603487/Error-is-not-a-function-in-ASPNet-MVC/Wed, 30 Nov 2016 01:58:05 GMT