scripting - How to strip down a jquery to fit your needs? -
I am running this script, and I wonder if I need all
this 70 KB, and I would love to be able to strip it down.
$ ('anframe'). // (function () {var e = $ (this); if (! E.Data ('state')} // if the state is undefined e.data ('state', 'open'); // ' Remove the height of the frame from the frame frame of the set / rel attribute highlighted in the state 'Highlight' = E.attr ('rel'); var pat1 = new RegExp ('height:'); pat1.test (frameshigh); frameshit = regxp Right contex; var stomach 2 = new regx ('px'); pat2.test (frame height)); FrameHeight = RegExp.leftContext; If FrameFeight || (Math.ceil (frameHeight)! = Math.floor (frameHyight)) {// if it is empty or not an integer frame hect = '550'; // default frame height, if none is specified}; Framehead = + 'px'; Framewidth = '100%'; // After the link just insert the iframe e.after ('& lt; iframe style = "width:' + framewidth + '; height:' + frame ight + '; boundary: solid 0px #ccc; margin-bottom: 1em; Background: #fff; "src = '+ e.attr (' href ') +' frameborder =" 0 "& gt; & lt; / iframe & gt; '); Var iframe = e.next ('iframe'); // Insert "Loading ..." text iframe.before ('& lt; small square = "cool" & gt; keep on one second ... & lt; / small & gt; iframe.load (function ( ) {// Once the content was loaded please load iframe.slideDown (500); // iframe.prev ('small') below. Remove (); // 'Loading ...'}) ; E.attr ('title', 'hide'); // set the link title for 'hide') and if (edata ('state') == 'closed') {// if state 'closed' .data ('state', 'open'); E.next ('iframe'). Slatedown (500); E.attr ('title', 'hide');} and if (e.data ('state') == 'open') {// if state 'open' idata ('state', 'closed'); E.X ('iframe'). SlideUp (500); E. RT ('title', 'show');} return false; });});
Comments
Post a Comment