Trending questions in JQuery

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,414 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,521 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,182 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,615 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
6,012 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,964 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,761 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,668 views
0 votes
1 answer

How can I convert a DOM element to a jQuery element?

Hello, Use this: var elm = document.createElement("div"); var jelm = ...READ MORE

Nov 25, 2020 in JQuery by Niroj
• 82,880 points
2,159 views
0 votes
1 answer

How to disable HTML links using jquery?

Hello @kartik, Got the fix in css. td.disabledAnchor a{ ...READ MORE

Nov 26, 2020 in JQuery by Niroj
• 82,880 points
2,115 views
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,465 views
0 votes
1 answer

How to Disabling and enabling a html input button?

Hello @kartik, Using jQuery Disabling a html button $('#Button').attr('disabled','disabled'); Enabling a ...READ MORE

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

How to scroll HTML page to given anchor?

Hello @kartik, Try this: function scrollTo(hash) { ...READ MORE

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

What is the difference between jQuery: text() and html() ?

Hello @kartik, The text() method entity-escapes any HTML that is ...READ MORE

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

How to remove an item from a select box?

Hii, Remove an option: $("#selectBox option[value='option1']").remove(); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <select name="selectBox" id="selectBox"> ...READ MORE

Nov 26, 2020 in JQuery by Niroj
• 82,880 points
835 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,080 views
0 votes
1 answer

How can selector expression to not select elements with a specific class?

Hello @kartik, You need the :not() selector: $('div[cla ...READ MORE

Nov 26, 2020 in JQuery by Niroj
• 82,880 points
597 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
685 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,869 views
0 votes
1 answer

How to Get the real width and height of an image with JavaScript?

Hello, Webkit browsers set the height and width ...READ MORE

Nov 25, 2020 in JQuery by Niroj
• 82,880 points
528 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,101 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,064 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,366 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,752 views
0 votes
1 answer

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

Hello @kartik, Looks like your buttons are not ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
8,112 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
975 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
940 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,784 views
0 votes
1 answer

How to import jQuery UI using ES6/ES7 syntax?

Hii, Add a alias in webpack config: resolve: { ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
7,477 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,559 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,263 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,558 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,159 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,085 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,738 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
472 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
394 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
363 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,186 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,724 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,634 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,794 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,394 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,123 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
3,016 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,863 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,536 views
0 votes
1 answer

How to convert form data to JavaScript object with jQuery?

Hello @kartik, You can use: function form_to_json (selector) { ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
2,740 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
1,001 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,467 views