Ads 468x60px

For New Update Use this Link Offer for you


Thursday, 20 March 2014

jquery lightbox in

jquery lightbox in
In this article i am explained  how we can implement the jQuery lightbox in our site.This is very easy to implement follow the instruction below step by step 

 jQuery scripts used in your projects. Simple show(), hide() will make this ready to use jQuery Lightbox. It’s simple and free download and easy to integrate in your projects. Below code will explain you how to make this simple jquery lightbox.

Step 1 Create a file called index.aspx

  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

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

<html xmlns="">
<head runat="server">
    <title>Ligh Box( </title>

    <link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript">
    function load_as_lightbox() {
        var DocumentHeight = $(document).height();
        $('.as_lightbox_wrapper').css('height', DocumentHeight); // Set document height for As_Lightbox wrapper
    function ShowLightBox(DivId) {
        $('.as_lightbox_wrapper').show(); // Show the wrapper
        $('#' + DivId + '').show('slow'); // Show the Lightbox div, you can use another jQuery view functions such as fadeIn, fadeToggle for animations
    function HideLightBox(DivId) {
        $('.as_lightbox_wrapper').hide('slow'); // Hide the As_Lightbox wrapper
        $('#' + DivId + '').hide(); // Hide the div
    $(document).ready(function () {
        load_as_lightbox(); // call this function after document loads
        $('#Show_Lightbox').click(function () {
            ShowLightBox('Simple_Lightbox'); // call the As_Lightbox show function
            return false;
        $('#as_lightbox_close').click(function () {
            HideLightBox('Simple_Lightbox'); // call the As_Lightbox close function
            return false;
<style type="text/css">
    border:2px dashed #17A3F7;
    margin:0 auto;
    <form id="form1" runat="server">
    <!-- AS_lightbox div (division) starts -->
<div class="as_lightbox_wrapper"></div> <!-- As_lightbox wrapper (half transparent background) -->
<div class="as_lightbox_container" id="Simple_Lightbox"> <!-- Set ID As_Lightbox here -->
    <div class="as_lightbox">
        <div class="as_lightbox_close" id="as_lightbox_close">
            <img src="images/close_flat_icon.png" alt="Close Lightbox" title="Close" />
        </div> <!-- As_Lightbox close icon -->
        <div class="as_clear"></div>
        <!-- As_Lightbox contents will starts here-->
        <p>As-Lightbox content will goes here. You can add any contents Texts, Images, Videos here. It wont conflict will other scripts Simple jQuery show(), hide() gives this lightbox</p>
        <!-- As_Lightbox contents ends here -->
<!-- AS_lightbox div (division) Ends -->
<div class="as_wrapper">

<a id="Show_Lightbox" class="as_a">Show Lightbox</a>

Step 2 create a file called style.css:


Output as shown below at run time

 Click on show lightbox link then lightbox popup is shown as below

Download sample code attached

 Jquery LightBox

No comments:

Post a Comment



New Updates

Related Posts Plugin for WordPress, Blogger...

Related Result