Latest questions in JQuery

0 votes
1 answer

How to add a “readonly” attribute to an <input>?

Hello, For jQuery <1.9 $('#inputId').attr('readonly', true); ...READ MORE

Nov 24, 2020 in JQuery by Niroj
• 82,880 points
1,435 views
0 votes
1 answer

How to make $.post() use contentType=application/json in jquery?

Hii, Try this: $.ajax({ url:url, type:"POST", ...READ MORE

Nov 24, 2020 in JQuery by Niroj
• 82,880 points
9,961 views
0 votes
1 answer

How to set jquery input select all on focus?

Hello @kartik, Try using click instead of focus. It seems to ...READ MORE

Nov 24, 2020 in JQuery by Niroj
• 82,880 points
4,141 views
0 votes
1 answer

How can I determine the direction of a jQuery scroll event?

Hello @kartik, Check current scrollTop vs previous scrollTop var lastScrollTop = 0; $(window).scroll(function(event){ ...READ MORE

Nov 24, 2020 in JQuery by Niroj
• 82,880 points
669 views
0 votes
1 answer

How to set upload_max_filesize in .htaccess?

Hello @kartik, php_value upload_max_filesize 30M is correct. You will ...READ MORE

Oct 27, 2020 in JQuery by Niroj
• 82,880 points
3,728 views
0 votes
1 answer

How to set data attributes in HTML elements?

Hello @kartik, HTML <div id="mydiv" data-myval="10"></div> JS var a = $('#mydiv').data('myval'); ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
951 views
0 votes
1 answer

How to wait until an element exists?

Hello @kartik, DOMNodeInserted is being deprecated, along with the ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
4,626 views
0 votes
1 answer

How to find a parent with a known class in jQuery?

Hello @kartik, Assuming that this is .d, you can write $(this).closest('.a'); The closest method returns the ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
6,604 views
0 votes
1 answer

How to get the first element of an array?

Hello @kartik, Try this: alert(ary[0]) Hope it helps!! Thank you ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
913 views
0 votes
1 answer

How to Smooth scroll to div id jQuery?

Hello @kartik, You need to animate the html, body $("#button").click(function() ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
34,711 views
0 votes
1 answer

How to pass parameters in GET requests with jQuery?

Hello @kartik, Use data option of ajax. You ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
6,465 views
0 votes
1 answer

How do I check if file exists in jQuery or pure JavaScript?

Hello @kartik, With jQuery: $.ajax({ url:'http://www.example.com/somefile.ext', ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
5,977 views
0 votes
1 answer

How do I check if the mouse is over an element in jQuery?

Hello @kartik, Use this code: $("someelement").mouseenter(function(){ ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
2,071 views
0 votes
1 answer

How do I iterate through children elements of a div using jQuery?

Hello @kartik, Use children() and each(), you can optionally pass a ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
4,923 views
0 votes
1 answer

How can I detect if a selector returns null?

Hello @kartik, My favourite is to extend jQuery ...READ MORE

Oct 5, 2020 in JQuery by Niroj
• 82,880 points
3,044 views
0 votes
1 answer

How to get the size of the screen, current web page and browser window?

Hello @kartik, You can get the size of ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
355 views
0 votes
1 answer

How to scroll to element from bottom to top with a nice animation using Jquery?

Hello @kartik, Assuming you have a button with ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
3,841 views
0 votes
1 answer

How can I upload files asynchronously?

Hello @kartik, Using JavaScript code you can do it ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
458 views
0 votes
1 answer

How to insert an item into an array at a specific index?

Hello @kartik, You can implement the Array.insert method by doing ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
1,541 views
0 votes
1 answer

How to use $(document).ready equivalent without jQuery

Hello @kartik, Using DOMContentLoaded that is supported by over ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
1,226 views
0 votes
1 answer

How can I select an element with multiple classes in jQuery?

Hello @kartik, If you want to match only ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
3,032 views
0 votes
1 answer

How to get the children of the $(this) selector?

Hello @kartik, The jQuery constructor accepts a 2nd ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
383 views
0 votes
1 answer

How can I refresh a page with jQuery?

Hello @kartik, Use location.reload(): $('#something').click(function() { location.reload(); }); The reload() function ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
1,740 views
0 votes
1 answer

How to Get Currently Selected Tab Index In jQuery UI Tabs?

Hello @kartik, If you need to get the ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
17,411 views
0 votes
1 answer

Error:jquery each loop return false not end the function

Hii @kartik, Returning from one function doesn't call as it's ...READ MORE

Jun 2, 2020 in JQuery by Niroj
• 82,880 points
7,315 views
0 votes
1 answer

How to prevent multiple selection in jQuery UI Selectable plugin?

Hii @kartik, What I did is that I allow multiple ...READ MORE

May 30, 2020 in JQuery by Niroj
• 82,880 points
978 views
0 votes
1 answer

How to refresh a jQuery UI Slider after setting min or max values?

Hello @kartik, You should try doing something like ...READ MORE

May 30, 2020 in JQuery by Niroj
• 82,880 points
5,019 views
0 votes
1 answer

How to attach callback to jquery effect on dialog show?

Hello, Try out the code using jQuery Promise object: $("#dialog").dialog({ ...READ MORE

May 30, 2020 in JQuery by Niroj
• 82,880 points
1,833 views
0 votes
1 answer

How can you disable scroll bars in the jQuery UI dialog box?

Hello @kartik, I solved the problem like this: .dialog({ ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
5,115 views
0 votes
1 answer

How to move an item programmatically with jQuery sortable while still triggering events?

Hello, $("selector").trigger("sortupdate"); you will have to  pass as second argument  ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
3,766 views
0 votes
1 answer

JQuery Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'

Hello @kartik, Try this - it works for ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
1,455 views
0 votes
1 answer

How to check if button is disabled in jQuery Mobile?

Hello, you can try $("#deliveryNext").is(":disabled") The following code works for ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
4,144 views
+1 vote
2 answers

How to set cache false for getJSON in jQuery?

You can't pass any configuration parameters to ...READ MORE

Oct 7, 2020 in JQuery by Amit
• 140 points
2,523 views
0 votes
1 answer

Error:jQuery scrollTop not working in Chrome but working in Firefox

Hello @kartik, If your CSS html element has the following overflow markup, scrollTop will ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
14,140 views
0 votes
1 answer

How do I pre-populate a jQuery Datepicker textbox with today's date?

Hello @kartik, You must FIRST call datepicker() > then use ...READ MORE

May 29, 2020 in JQuery by Niroj
• 82,880 points
11,550 views
0 votes
1 answer

Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'

Hello, Try this - it works for me: $(".editDialog").on("click", ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
965 views
0 votes
1 answer

How to set cache false for getJSON in jQuery?

Hello @kartik, Your code just needs a trigger ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
723 views
0 votes
1 answer

How to remove close button on the jQuery UI dialog?

Hii, I found this worked for me in the end ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
4,363 views
0 votes
1 answer

Twitter Bootstrap: How to see the state of a toggle button?

Hii @kartik, You can see what classes the ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
1,447 views
0 votes
1 answer

Uncaught ReferenceError:Karma: jQuery is not defined

Hii @kartik, You first have to load jQuery ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
4,601 views
0 votes
1 answer

Error: cannot call methods on button prior to initialization; attempted to call method 'loading'

Hii @kartik, It's caused by jquery-ui and bootstrap-button ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
5,667 views
0 votes
1 answer

Error: no such method 'show' for tooltip widget instance

Hello, The root of this and similar problem "no such method ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
3,069 views
0 votes
1 answer

How to close all active bootstrap modals on session timeout?

Hello @kartik, Use the following code: $('.modal').modal('hide'); Also if you ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
7,682 views
0 votes
1 answer

How to enable Bootstrap tooltip on disabled button?

Hii @kartik, You can wrap the disabled button ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
4,697 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

May 12, 2020 in JQuery by Niroj
• 82,880 points
2,994 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
22,498 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
14,351 views
0 votes
1 answer

How to pass parameters in GET requests with jQuery?

Hello, Here is the syntax using jQuery $.get $.get(url, data, ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
41,918 views
+1 vote
1 answer

How to check if a jQuery plugin is loaded?

Hello @kartik, for the plugins that doesn't use ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
1,676 views
0 votes
1 answer

What is the equivalent of jQuery .hide() to set visibility: hidden

Hello Kartik, There isn't one built in but ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
13,255 views