All jQuery Codes

How to get HTML of any control using jQuery

In this post, we will see that how we can get the HTML part or I should say innerHTML of any control. Well, jQuery provides a function "html()" which will give the html of the control. For example, I have placed a div control on the page which has h1 and h2 tag. <div id="dvExample"> […]
Read the rest of this entry »

Show Hand/Pointer cursor on image button with jQueryUI datepicker control

In my previous post, I have explained you that how you can integrate jQueryUI datepicker control with ASP.NET. If you have not read it, then read it first. When you use "showOn:button" option with the datepicker control, it display a button next to the textbox. However there is a concern. When you take mouse on […]
Read the rest of this entry »

Disable/Enable an element using jQuery

You must have come across a situation where you have to make any element disable or enable.There are couple of ways using them you can enable/disable any element using jquery. jQuery really makes your task very easy. In below given example, I have disabled a textbox with id "txtName". Approach 1 $("#txtName").attr("disabled", true); Approach 2 […]
Read the rest of this entry »

Hide all elements of HTML form using jQuery

If you want to hide all the elements of the form then below jQuery code will help you to achieve this. <script type="text/javascript"> $(document).ready(function(){ $("#form1").hide() }); </script> "form1" is the Id of the HTML form. Hide() function can be used with any control. If you don't want to hide all the elements of the form […]
Read the rest of this entry »

Find control with CSS class

jQuery provides a very cool mechanism to find the control of the page with the class name. Let's say you want to find out all the a tags which are having "sample" as Css class. jQuery has really made life simple for programmers. Below given code does exactly the same thing. It also adds the […]
Read the rest of this entry »

Call jQuery from Javascript function

Have you ever come accross a situation where you need to call Jquery from or within a Javascript function? Well, it's not that tough either. You can directly write your jQuery code within a JavaScript function. See below code. I have placed a button on my page which makes a call to a Javascript function […]
Read the rest of this entry »

Responsive Menu
Add more content here...