Search box is displayed when click on search icon using jquery

In this blog it is explained that how to display search box when user click on search icon using jquery.

search_icon  search_icon

 

Continue reading “Search box is displayed when click on search icon using jquery”

addclass method in jquery

In this blog it is explained how addClass, removeClass and toggleClass method is used in jquery to add or remove class from  html element. It is very useful in jquery as it add or remove desired class to any html element dynamically.

  1. Write simple html which show one text line and three button with three different id’s.
<html>
<head>
<title>css classes</title>
</head>
<body>
<p>It is blue color text.<p>
<button id=”b1″>Add blue</button>
<button id=”b2″>Remove blue</button>
<button id=”b3″>Toggle blue</button>
</body>
</html>.

Continue reading “addclass method in jquery”

Alert when button click using jquery

In this blog how to alert when button is click using jquery is explained.

  1. write simple html to display button.
<html>
<head>
<title>print variable</title>
</head>
<body>
<button>click here</button>
</body>
</html>

Continue reading “Alert when button click using jquery”

Hide button when clicked or hovered using jquery

This blog explain simple program in which there are two button when first button hover it disappear and second one is disappear when clicked using jquery.

  1. first of all write simple html for two button.
<html>
<head>
<title>Hide button</title>
</head>
<body>
<p>click buttons if you can</p>
<button id=“b1”>hover</button>
<button id=“b2”>click</button>
</body>
</html>

Continue reading “Hide button when clicked or hovered using jquery”