Team:TU Delft/files/jquery address
From 2010.igem.org
(New page: <html> /* * jQuery Address Plugin v1.2.1 * http://www.asual.com/jquery/address/ * * Copyright (c) 2009-2010 Rostislav Hristov * Dual licensed under the MIT or GPL Version 2 licenses. ...) |
|||
Line 1: | Line 1: | ||
- | |||
/* | /* | ||
* jQuery Address Plugin v1.2.1 | * jQuery Address Plugin v1.2.1 | ||
Line 28: | Line 27: | ||
b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.queryString(),b=[];if(a&&a.indexOf("=")!=-1){a=a.split("&");for(var g=0;g<a.length;g++){var h=a[g].split("=")[0];c.inArray(h,b)==-1&&b.push(h)}}return b},hash:function(a){if(a!==undefined){this.value(this.value().split("#")[0]+(a?"#"+a:""));return this}a=this.value().split("#");return a.slice(1,a.length).join("#")}}}();c.fn.address=function(v){var w=function(){if(c(this).is("a")){var p=v?v.call(this):/address:/.test(c(this).attr("rel"))? | b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.queryString(),b=[];if(a&&a.indexOf("=")!=-1){a=a.split("&");for(var g=0;g<a.length;g++){var h=a[g].split("=")[0];c.inArray(h,b)==-1&&b.push(h)}}return b},hash:function(a){if(a!==undefined){this.value(this.value().split("#")[0]+(a?"#"+a:""));return this}a=this.value().split("#");return a.slice(1,a.length).join("#")}}}();c.fn.address=function(v){var w=function(){if(c(this).is("a")){var p=v?v.call(this):/address:/.test(c(this).attr("rel"))? | ||
c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(p);return false}};c(this).click(w).live("click",w);c(this).live("submit",function(){if(c(this).is("form")){var p=v?v.call(this):c(this).attr("action")+"?"+c(this).serialize();c.address.value(p);return false}});return this}})(jQuery); | c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(p);return false}};c(this).click(w).live("click",w);c(this).live("submit",function(){if(c(this).is("form")){var p=v?v.call(this):c(this).attr("action")+"?"+c(this).serialize();c.address.value(p);return false}});return this}})(jQuery); | ||
- |
Latest revision as of 23:01, 6 June 2010
/*
* jQuery Address Plugin v1.2.1 * http://www.asual.com/jquery/address/ * * Copyright (c) 2009-2010 Rostislav Hristov * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Date: 2010-05-20 09:39:26 +0300 (Thu, 20 May 2010) */
(function(c){c.address=function(){var v=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},g=c.address.parameterNames(),h=0,q=g.length;h<q;h++)b[g[h]]=c.address.parameter(g[h]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:g,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},w=function(a,b,g){c(c.address).bind(a,b,g);return c.address},p=function(){var a=d.href.indexOf("#");return a!=-1?W(J(t(d.href.substr(a+ 1),j))):""},X=function(){return"javascript"},Y=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},K=function(a,b){return u&&d.protocol=="file:"?b?f.replace(/\?/,"%3F"):f.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable&&b)return(a!=""?"!":"")+a;return a.replace(/^\!/,"")},x=function(a,b){return parseInt(a.css(b),10)},Z=function(a){for(var b,g,h=0,q=a.childNodes.length;h<q;h++){if(a.childNodes[h].src)b=String(a.childNodes[h].src);if(g=Z(a.childNodes[h]))b=g}return b}, H=function(){if(!L){var a=p(),b=f!=a;if(y&&m<523){if(D!=F.length){D=F.length;if(typeof z[D-1]!=A)f=z[D-1];G(j)}}else if(u&&m<7&&b)d.reload();else if(b){f=a;G(j)}}},G=function(a){v($);v(a?aa:ba);E(ca,10)},ca=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+(c.address?c.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,""),b=n[i.tracker];if(typeof b==M)b(a);else if(typeof urchinTracker==M)urchinTracker(a);else if(typeof pageTracker!=A&&typeof pageTracker._trackPageview==M)pageTracker._trackPageview(a); else typeof _gaq!=A&&typeof _gaq.push==M&&_gaq.push(["_trackPageview",a])},da=function(){var a=l.contentWindow.document;a.open();a.write("