Friday, November 21, 2014

Using Show() and Hide() methods in JQuery

show() and hide() methods:

     You can use show and hide methods of a JQuery object to change the visibility of it like in the following example. You can check the visibility with is(':visible') method of JQuery.


  <script src=""></script>
   $(document).ready(function() {
     $('#myButton').click(function () { 
        return true;
   <input type="button" id="myButton" value=" show/hide link">
   <a id='myLink' href='#' onClick="myLink_onClick()">my link</a>

The screen will look like the following.

Using Show() and Hide() methods in JQuery
Figure 1

You can download the source code from here.  

No comments:

Post a Comment