File: lib/main.js

Recommend this page to a friend!
  Classes of Greg Lane   GrowShrink.js   ???   Download  
File: lib/???
Role: Example script
Content type: text/plain
Description: Contains examples of use
Class: GrowShrink.js
Grow or shrink elements inside their parents
Author: By
Last change: Update of lib/main.js
Date: 2 days ago
Size: 1,653 bytes
 

Contents

Class file image Download
$(document).ready(function(){ $("#bottomright").click(function(e){ hidekids(); $("#colorblock").growshrink(); }); $("#shrinktopleft").click(function(e){ $("#colorblock").growshrink({type:"shrink",direction:"topleft"}); }); $("#bottomleft").click(function(e){ hidekids(); $("#colorblock2").growshrink({ direction:"bottomleft" }); }); $("#shrinktopright").click(function(e){ $("#colorblock2").growshrink({type:"shrink",direction:"topright"}); }); $("#topright").click(function(e){ hidekids(); $("#colorblock3").growshrink({ direction:"topright" }); }); $("#shrinkbottomleft").click(function(e){ $("#colorblock3").growshrink({type:"shrink",direction:"bottomleft"}); }); $("#topleft").click(function(e){ hidekids(); $("#colorblock4").growshrink({ direction:"topleft" }); }); $("#shrinkbottomright").click(function(e){ $("#colorblock4").growshrink({type:"shrink",direction:"bottomright"}); }); $("#middle").click(function(e){ hidekids(); $("#colorblock5").growshrink({ direction:"middle" }); }); $("#shrinkmiddle").click(function(e){ $("#colorblock5").growshrink({type:"shrink",direction:"middle"}); }); function hidekids(){ $("#wrapperblock").children().width(0); $("#wrapperblock").children().height(0); $("#wrapperblock").children().css('margin-top',0); $("#wrapperblock").children().css('margin-bottom',0); $("#wrapperblock").children().css('margin-left',0); $("#wrapperblock").children().css('margin-right',0); } });