We can get value and text value of the option selected in the Dropdown using jQuery val() and text() methods. For getting the value of the selected option from Dropdown use val() method and for text string available for the selected option will be retrieved using text() method as shown below:
To get an array of selected checkboxes values we need to use jQuery each() method and :checked selector on a group of checkboxes. The each() method will loop over the checkboxes group in which we can filter out selected checkboxes using :checked selector.
In general application with tabular data, may have selected using a checkbox on each row. In that case, there should be a master checkbox to check/uncheck all table rows. Here we will discuss an example table that will have a master checkbox on the header and each table row with its own checkbox. A user
The prop() method of jQuery is used to check or uncheck a checkbox. We can have a button or method to trigger a dynamic change in the checkbox selected state.
In jQuery, a Checkbox’s state can be checked using prop() method and :checked selector. The following are the detailed discussions on How to check checkbox status using jQuery prop() method and by using :checked selector.
In this post, we will discuss jQuery custom code to implement Image/ Thumbnail Zoom effect on hover. For a number of images, we usually place thumbnails of larger images which be selected by the user to view full-size image. In this example, we will place images in square boxes which will show thumbnails by default
Sometimes HTML pages having form fields need keyboard navigation by a user in a specific area or a container. A user can navigate using TAB forward motion or TAB+SHIFT key combination for backward navigation through form elements like the link, input, text areas, select dropdowns etc. But we can control it to some extent using
Esc key on our keyboard can be useful even in Web pages and applications. We can use Esc key to close dialogue boxes or any custom popup modals. Here we will discuss even handling on ESC key press in which we can fire any event we want.
In one of my older AngularJS project I was facing a strange issue, there were two select boxes with values populated differently in them. The values in second select drop-down depend upon the first one.