What is Attribute? How to get Attribute from HTML Element?
What is Attribute in JQuery? All HTML elements have attributes. It provides additional information about an element. Let us see some example of attributes below. class Name id title name src style Consider the HTML
How to use Selectors in JQuery
What is Selectors? A jQuery Selector is a jquery function which uses expressions to find the given/matching elements inside the DOM object. We have already had details about selectors here. So i am going to starting
Features of JQuery
Main Focus of jQuery? A jQuery is a fast and concise JavaScript Library. jQuery simplifies HTML document traversing and other operations like Ajax interaction, event handling, and animation. It is designed to write less code
What is $ in Jquery?
What is $ ? In jQuery, $ is an alias for jQuery. From the above statement we can able to understand, function are available without using $. If you need to use another JavaScript library
Jquery Selectors
What is Selector?? As a name implies, selectors allow us to select the elements/properties like div, span., to performing actions on it. What is use of it ?? A Selector identifies an HTML tag/element by using
Difference between ‘return false;’ and ‘e.preventDefault();
Difference between ‘return false;’ and ‘e.preventDefault(); e.preventDefault() which will prevent the default event from occurring, but will continue the event flow (ie., next line of code in the function) return false will always had
How to close the div popup/any Element while clicking outside of the popup
How to close the div popup/any Element while clicking outside of the popup JQUERY $(document).mouseup(function(e) { var container = $("#divPatientDetail"); if (container.has(e.target).length === 0) { container.hide(); } }); Explanation: var container = $("#divPatientDetail"); -- Assigning
How to check the div is visible/Hidden
How to check the div(any element) is visible/Hidden HTML : <div id="divPatientDetail"></div> JQuery : if ($("#divPatientDetail").is(":hidden")) {} if ($("#divPatientAcuityDetails").is(":visible")) {} Explanation : Codition will check whether "divPatientDetail" div is hidden or visible