Follow in Twitter & Facebook

Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools

Saturday, August 25, 2012

Show hide div using jQuery in

In this article we will discuss about how we can show or hide a div using jQuery in our application. You can also check my other article on jQuery on how to disable right click by using jQuery.

First we have to give reference to the jQuery library like below:

script type="text/javascript" src=""></script>

Then we need to write the function. Below is the full .aspx code.
.aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowHideDiv.aspx.cs" Inherits="ShowHideDiv" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">

<script type="text/javascript" src=""></script>

<title>Show hide div using jQuery</title>

<script type="text/javascript">

$(document).ready(function (){

$('.show_hide').click(function () {

<form id="form1" runat="server">
<div><a href="#" class="show_hide">Show/hide</a>
<div class="mydiv">This div will behave like show or hide !!!</div>

0 on: "Show hide div using jQuery in"