JQuery Basic

Get and Set Dropdown List Selected Value with jQuery

Get and Set Dropdown List Selected Value with jQuery

Dropdownlist Get/Set Value: Get and set drop-down box selected value. In web pages while form submission many time we commonly use drop-down list, this post explains how to get / fetch dropdown list selected value. In jQuery we get drop-down list selected by using .`val()` method. The .val() method is primarily used to get the values […]


by - Satinder singh

Add active class to Li on click jquery.

Add active class to Li on click jquery.

Overview: Adding a class to List tag  .i.e  li element on click.This article explains how to add class to Li or any HTML tag using jQuery. The most common scenario is to add a class when you click on a menu link and want to make it highlighted. For adding class in jQuery we use .addClass() jquery […]


by - Satinder singh

How to get current url Jquery vanilla Javascript

How to get current url Jquery vanilla Javascript

Overview: Get current web page URL in jQuery and javascript. This is most common think while developing websites where we need to fetch page URL for performing further function i.e get pathname, hostname, query string etc. Example: My page URL is  http://localhost:2239/Default2.aspx?id=5&name=SatinderSingh //* var getCurrentURL =window.location.href; //http://localhost:2239/Default2.aspx?id=5&name=SatinderSingh var getHostname=window.location.hostname; //localhost var getPathName=window.location.pathname // Default2.aspx var […]


by - Satinder singh

How to remove next row tr from table in jquery

How to remove next row tr from table in jquery

 jQuery remove tr: This article explains how to delete tables next row .i.e how to remove or delete next row / tr from a table on a button click in jquery. For selecting next element we use .next() jQuery method, so we can able to delete next row from selected element.  jQuery .next() method get the immediately following […]


by - Satinder singh

JQuery: How to Validate Checkbox whether the Checkbox is Checked or Unchecked

JQuery: How to Validate Checkbox whether the Checkbox is Checked or Unchecked

 jquery checkbox is checked or unchecked: This article explains how to get the checkbox checked status, or validate whether the checkbox is checked or unchecked in jQuery. In other words, how to test the state of checkbox i.e. whether the checkbox is checked or unchecked in jQuery.  Here we use jquery .is() method and matched checked attribute. Description: The method .is() […]


by - Satinder singh

jQuery Change Button Text Value Dynamically.

jQuery Change Button Text Value Dynamically.

Button text changed dynamically: This article explains how on button click we can change text value of that clicked button  .i.e dynamic button text value gets changed. For example, when we have buttons like For example, when we have buttons like Follow, Like, Pending, etc. and on click we need to change its text as […]


by - Satinder singh

1 2 3 4