Introduction to JQuery
JQuery is a JavaScript library supported by multi browser. By using jquery we can do the things like Finding controls, applying styles, bind or unbind events, applying animations and much more very easily.
In JavaScript we will find the controls by using document.getElementById("controlid"). In JQuery we can find the controls in different ways like by using it's id, class name, tag name.
You can download the latest JQuery version from Jquery.com
Finding control by its id
Use "#" before the control id. example $("#controlid")
Sample :
<script language="javascript">
function getValUsingJQuery() {
alert($("#txtSample").val());
}
</script>
Finding control by its class name
Use "." before the control class name. example $(".classname")
Sample :
<script language="javascript">
function getValUsingClass() {
alert($(".clstextbox").val());
}
</script>
Finding control by its tag name
Use tag name to find the control. example $("tagname")
Sample :
Sample :
<script language="javascript">
function getValUsingTag() {
alert($("input:text").length);
}
</script>
Useful Tools
Online Code Editor and Compiler
HTML Minifier
Online HTML Compiler/Preivew
Word Count Tool
Replace Text/Word tool
Latest Blogs
How to check if a canvas is empty or blank
Maintain div or panel scroll position after postback in asp.net update panel
Draggable button using jquery ui
Get total number of tables, views, stored procedures and functions count and names in sql server
JavaScript function to get date in mmddyyyy hhmmss ampm forma