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,400 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,515 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,174 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,612 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,011 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,958 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,759 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,659 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,156 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,111 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,463 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,126 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,125 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
871 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
831 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,079 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
684 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
595 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,862 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
525 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,096 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,059 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,360 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,741 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,105 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
973 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
937 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,781 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,556 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,258 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,555 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,152 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,079 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,725 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
469 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
391 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
362 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,180 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,722 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,633 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,789 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,386 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,118 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,012 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,860 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,530 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,736 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
997 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