Explain jQuery Selectors

Selectors are the strings you pass to the jQuery function to select elements in the DOM. Example:

In this example, we used “#album-list img” as a selector to find image tags. If you think the string looks like something you might use in a cascading style sheet (CSS), you would be correct. The jQuery selector syntax derives from CSS 3.0 selectors, with some additions. Table 8-1 lists some of the selectors you’ll see in everyday jQuery code. Here are some examples of Common Selectors: Example Meaning $(“#header”) Find the element with an id of “header” $(“.editor-label”) Find all elements … Click here to continue…..

Check All Checkbox of a grid by using JavaScript

Modal window in javascript.

Here is a syntax that how you can use modal dialog window in any web page. There are 2 types of popup windows: window.open ModalDialog In both of then there are only one difference i.e. in ModalDialog you can’t focus on parent browser page without closing this pop-up window but in window.open you can focus on parent window any time.

How to use watermark property on password textbox in a web-page?

Here I am giving you an example where you can see that watermark property works fine with required field validator in Asp.Net. This whole process can be done by using simple jQuery tricks. In my concept we have 2 textboxes and one of them is

and another textbox is

At the initial time of page load “txtPassword” taxtbox has “display;none” property. and its hide and show will be maintained by jQuery function. Example : use this code in aspx page:

javascript code at the end on the page:

and this jQuery function is use for watermark … Click here to continue…..