// Files/snowfun/zoomer.for.jquery-1.0.zip
<% @ Page Language = " C # " Autoeventwireup = " True " Codefile = " Default. aspx. CS " Inherits = " _ Default " %>
<! Doctype HTML public"-// W3C // dtd xhtml 1.0 transitional // en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = " Http://www.w3.org/1999/xhtml " >
<Head id = " Head1 " Runat = " Server " >
<Title> No title page </title>
<SCRIPT type = " Text/JavaScript " Language = " Javascript " > </SCRIPT>
<Meta http-equiv = " Content-Type " Content = " Text/html; charsets = UTF-8 " />
<Meta http-equiv = " Content-style-type " Content = " Text/CSS " />
<LINK rel = " Stylesheet " Type = " Text/CSS " Href = " Zoomer.css " Media = " Screen " />
<Meta http-equiv = " Content-language " Content = " FR " />
</Head>
<Body>
<Div id =" Page " >
<Center>
</Center>
<Br>
<Div id = " Content " >
<Div Class =" Container " >
<Ul Class = " Thumb " >
<Li> <a href = " # " > <Asp: Image id = " Image1 " Runat = " Server " Imageurl = " ~ /Img/img_9484.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image2 " Runat =" Server " Imageurl = " ~ /Img/img_9486.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image3 " Runat = " Server " Imageurl = " ~ /Img/img_9487.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image4 " Runat = " Server " Imageurl = " ~ /Img/img_9488.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image5 " Runat = " Server " Imageurl =" ~ /Img/img_9490.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image6 " Runat = " Server " Imageurl = " ~ /Img/img_9491.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image8 " Runat = " Server " Imageurl = " ~ /Img/img_9542.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image7 " Runat = " Server " Imageurl = " ~ /Img/img_9494.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image9 " Runat = " Server " Imageurl = " ~ /Img/img_9498.jpg " /> </A> </LI>
<Li> <a href = " # " > <Asp: Image id = " Image10 " Runat = " Server " Imageurl = " ~ /Img/img_9499.jpg " /> </A> </LI>
</Ul>
</Div>
</Div>
<SCRIPT type = " Text/JavaScript " Src = " Http://code.jquery.com/jquery-latest.js " > </SCRIPT>
<SCRIPT type = " Text/JavaScript " Src = " Zoomer. js " > </SCRIPT>
<SCRIPT type = " Text/JavaScript " >
$ (Document). Ready (function (){
$ ( ' Ul. Thumb Li ' ). Zoomer ({speedview: 200 , Speedremove: 400 , Altanim: True , Speedtitle: 400 , Debug: False });
});
</SCRIPT>
</Body>
</Html>
Ul. Thumb { Float : Left ; List-style : None ; Margin : 0 ; Padding : 10px ; Width : 500px ; Background-color : White ;}
Ul. Thumb Li { Margin : 0 ; Padding : 5px ; Float : Left ; Position : Relative ; Width : 110px ; Height : 77px ;}
Ul. Thumb Li img { Width : 100px ; Height : 67px ; Border : 1px solid # ddd ; Padding : 5px ; Background : # F0f0f0 ; Position : Absolute ; Left : 0 ; Top : 0 ; -MS-interpolation-Mode : Bicubic ; }
Ul. Thumb Li IMG. Hover { Margin-top : 15px ; Background : Url(thumb_bg.png) No-repeat center Center ; Border : None ;}
. Title { Position : Absolute ; Width : 185px ; Height : 35px ; Margin : 0 ; Font-weight : 900 ; Background : Url(blue.png) No-repeat center Center ; Padding : 17px 0 0 0 ; Text-align : Center ; Color : # Fff ; }
( Function ($)
{$. FN. Zoomer = Function (B)
{ VaR C = $. Extend ({speedview: 200, speedremove: 400, altanim: False , Speedtitle: 400, debug: False }, B );
VaR D = $. Extend (C, B );
Function E (s)
{ If ( Typeof Console! = "Undefined "&& Typeof Console. Debug! = "Undefined ")
{Console. Log (s )}
Else {Alert (s )}}
If (D. speedview = undefined | D. speedremove = undefined | D. altanim = undefined | D. speedtitle = undefined) {e ('speedview: '+ D. speedview); E ('speedremove: '+ D. speedremove); E ('altanim: '+ D. altanim); E ('speedtitle: '+ D. speedtitle ); Return False }
If (D. DEBUG = undefined) {e ('speedview: '+ D. speedview); E ('speedremove: '+ D. speedremove); E ('altanim: '+ D. altanim); E ('speedtitle: '+ D. speedtitle ); Return False } If ( Typeof D. speedview! = "Undefined" | Typeof D. speedremove! = "Undefined" | Typeof D. altanim! = "Undefined" | Typeof D. speedtitle! = "Undefined ")
{ If (D. DEBUG = True ) {E ('speedview: '+ D. speedview); E ('speedremove: '+ D. speedremove); E ('altanim: '+ D. altanim); E ('speedtitle: '+ D. speedtitle )}
$ ( This ). Hover ( Function () {$ ( This ).Css ({'z-Index': '10'}); $ ( This ). Find ('img '). addclass ("hover "). stop (). animate ({margintop: '-110px', marginleft: '-77px', top: '000000', left: '000000', width: '500px ', height: '335px ', padding: '20px'}, D. speedview );
// If (D. altanim = true)
// {Var A = $ (this). Find ("IMG"). ATTR ("Alt ");
// If (A. length! = 0)
// {$ (This). prepend ('<SPAN class = "title">' + A + '</span> ');
// $ ('. Title'). animate ({marginleft:'-42px ', margintop: '90px '}
// , D.speedtitle).css ({'z-Index': '10', 'position': 'absolute ', 'float': 'left '}
// )}}
}, Function () {$ ( This ).Css ({'z-Index': '0'}); $ ( This ). Find ('img '). removeclass ("hover "). stop (). animate ({margintop: '0', marginleft: '0', top: '0', left: '0', width: '100px ', height: '67px ', padding: '5px '}, D. speedremove); $ ( This ). Find ('. title'). Remove ()}) }} (jquery );
Http://www.iteye.com/news/23754