cam discussions
Post on 05-Apr-2018
228 Views
Preview:
TRANSCRIPT
-
7/31/2019 Cam Discussions
1/135
functionaddSeriesDiscussions(title,catName,conceptMoreLink,catMoreLink){document.write("");
//varhtmlv2URL='https://supportforums.cisco.com/plugins/CiscoSupportCommunity_Read-Write-Module/js/cam-deps.js';//varhtmlv2JIVEURL='https://supportforums.cisco.com/externalcommunitydataservice-v2.jspa?format=HTML2&numThreads=10&questionStatus=All&age=anytime&q='+title;varhtmlv2JIVEURL='https://supportforums.cisco.com/externalcommunitydataservice.jspa?numThreads=10&communityId=1&q='+title;
$.getScript(htmlv2JIVEURL,function(){//$.getScript(htmlv2URL,function(){
varreadWriteMdodule=newReadWriteModule();readWriteMdodule.init();vardiscURLs=newString('SupportCommunityDiscussions
');discURLs=discURLs+"
Loading...";document.getElementById('discussionURLS').innerHTML=di
scURLs;vartimer=setInterval(function()
{ varthreads=readWriteMdodule.threads;//alert("threads:"+threads);document.getElementById('discussionURLS'
).innerHTML=discURLs;if(threads!=undefined){
clearInterval(timer);addDiscussionURLs(threads,ca
tName,conceptMoreLink,catMoreLink);}
},100);//});
});
}
functionaddDiscussionURLs(threads,catName,conceptMoreLink,catMoreLink){
if(typeof(threads)=='undefined'||threads==null){return;
}
varthreadFlag='false';varciscoThreads=threads;varout="";vardiscURLs=newString('SupportCommun
ityDiscussions
');vardisCount=0;for(varwordssinthreads){
if(disCount>=3)break;
disCount=disCount+1;out=threads[wordss];varname=out['name'];varurl=out['url']+"&channel=smartnav";
varauthor=out['author'];
-
7/31/2019 Cam Discussions
2/135
varmessageDate=out['creationDate']; discURLs=discURLs+''+name+'By'+author+',posted'+messageDate+'
';}discURLs=discURLs+'SeeAllDiscussions
';discURLs=discURLs+'SeeRelated'+catName+'Discussions';
document.getElementById('discussionURLS').innerHTML=discURLs;}
functionloadScript(url,functionCallback){varscript=document.createElement("script")script.type="text/javascript";
if(script.readyState){//IEscript.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;
functionCallback();}};}else{//Othersscript.onload=function(){functionCallback();};}
script.src=url;document.getElementsByTagName("head")[0].appendChild(script);}
functionaddCAMModule(title){title=formatTitle(title);//varhtmlv2URL='https://supportforums.cisco.com/plugins/CiscoSupportCommunity_Read-Write-Module/js/cam-deps.js';//varhtmlv2JIVEURL='https://supportforums.cisco.com/externalcommunitydataservice-v2.jspa?format=HTML2&numThreads=10&questionStatus=All&age=anytime&q='+title;varhtmlv2JIVEURL='https://supportforums.cisco.com/externalcommunitydataservice.jspa?numThreads=10&communityId=1&q='+title;
document.write('');document.write("");document.write("CiscoSupportCommunityisaforumforyoutoaskandanswerquesti
ons,sharesuggestions,andcollaboratewithyourpeers.Belowarejustsomeofthemostrecentandrelevantconversationshappeningrightnow.");
document.write("
");document.write("&
amp;nbsp;");$.getScript(htmlv2JIVEURL,function(){
//$.getScript(htmlv2URL,function(){varreadWriteMdodule=newReadWriteModule();readWriteMdodule.init();vartimer=setInterval(function()
-
7/31/2019 Cam Discussions
3/135
{varthreads=readWriteMdodule.threads;if(threads!=undefined){
clearInterval(timer);addRelatedDiscussion(threads)
;}
},100);//});
});document.write("");document.write("");//document.write("");
}
functionaddRelatedDiscussion(threads){
if(typeof(threads)=='undefined'||threads==null){toggle('discussionMainHead');return;
}
varthreadFlag='false';varciscoThreads=threads;varout="";vardiscURLs=newString();discURLs=discURLs+'';vardisCount=0;for(varwordssinthreads){
if(disCount>=5)break;disCount=disCount+1;out=threads[wordss];varname=out['name'];varurl=out['url']+"&channel=smartnav";threadFlag='true';
discURLs=discURLs+''+name+'';}discURLs=discURLs+'';
document.getElementById('discussionURLS').innerHTML=discURLs;if(threadFlag=='true'){
//document.getElementById('discussionMainHead').innerHTML="RelatedDiscussion";
$('#discussionMainHead').html("RelatedDiscussion");toggle('discussionMainHead');
}}
functiontoggle(obj){ varel=document.getElementById(obj);
el.style.display=(el.style.display!='none'?'none':'');}
functionformatTitle(str){str=str.replace(/\s*([!&>
-
7/31/2019 Cam Discussions
4/135
str=$.trim(str);str=str.replace(/\s/g,"+||+");returnstr;
}
/*!*jQueryJavaScriptLibraryv1.4.4*http://jquery.com/**Copyright2010,JohnResig*DuallicensedundertheMITorGPLVersion2licenses.*http://jquery.org/license**IncludesSizzle.js*http://sizzlejs.com/*Copyright2010,TheDojoFoundation*ReleasedundertheMIT,BSD,andGPLLicenses.**Date:ThuNov1119:04:532010-0500*/(function(window,undefined){
//Usethecorrectdocumentaccordinglywithwindowargument(sandbox)vardocument=window.document;
varjQuery=(function(){
//DefinealocalcopyofjQueryvarjQuery=function(selector,context){
//ThejQueryobjectisactuallyjusttheinitconstructor'enhanced'
returnnewjQuery.fn.init(selector,context);},
//MapoverjQueryincaseofoverwrite_jQuery=window.jQuery,
//Mapoverthe$incaseofoverwrite
_$=window.$,
//AcentralreferencetotherootjQuery(document)rootjQuery,
//AsimplewaytocheckforHTMLstringsorIDstrings//(bothofwhichweoptimizefor)quickExpr=/^(?:[^]*$|#([\w\-]+)$)/,
//IsitasimpleselectorisSimple=/^.[^:#\[\.,]*$/,
//Checkifastringhasanon-whitespacecharacterinit
rnotwhite=/\S/,rwhite=/\s/,
//UsedfortrimmingwhitespacetrimLeft=/^\s+/,trimRight=/\s+$/,
//Checkfornon-wordcharactersrnonword=/\W/,
-
7/31/2019 Cam Discussions
5/135
//Checkfordigitsrdigit=/\d/,
//MatchastandalonetagrsingleTag=/^(?:)?$/,
//JSONRegExprvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-
]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,
//UseragentRegExprwebkit=/(webkit)[\/]([\w.]+)/,ropera=/(opera)(?:.*version)?[\/]([\w.]+)/,rmsie=/(msie)([\w.]+)/,rmozilla=/(mozilla)(?:.*?rv:([\w.]+))?/,
//KeepaUserAgentstringforusewithjQuery.browseruserAgent=navigator.userAgent,
//FormatchingtheengineandversionofthebrowserbrowserMatch,
//Hasthereadyeventsalreadybeenbound?readyBound=false,
//ThefunctionstoexecuteonDOMreadyreadyList=[],
//ThereadyeventhandlerDOMContentLoaded,
//SaveareferencetosomecoremethodstoString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,
push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,
//[[Class]]->typepairsclass2type={};
jQuery.fn=jQuery.prototype={init:function(selector,context){
varmatch,elem,ret,doc;
//Handle$(""),$(null),or$(undefined)
if(!selector){returnthis;
}
//Handle$(DOMElement)if(selector.nodeType){
this.context=this[0]=selector;this.length=1;returnthis;
}
-
7/31/2019 Cam Discussions
6/135
//Thebodyelementonlyexistsonce,optimizefindingitif(selector==="body"&&!context&&document.body){
this.context=document;this[0]=document.body;this.selector="body";this.length=1;returnthis;
}
//HandleHTMLstringsif(typeofselector==="string"){
//ArewedealingwithHTMLstringoranID?match=quickExpr.exec(selector);
//Verifyamatch,andthatnocontextwasspecifiedfor#id
if(match&&(match[1]||!context)){
//HANDLE:$(html)->$(array)if(match[1]){
doc=(context?context.ownerDocument||context:document);
//Ifasinglestringispassedinandit'sasingletag//justdoacreateElementandskipthe
restret=rsingleTag.exec(selector);
if(ret){if(jQuery.isPlainObject(conte
xt)){selector=[document.cr
eateElement(ret[1])];jQuery.fn.attr.call(sel
ector,context,true);
}else{selector=[doc.createE
lement(ret[1])];}
}else{ret=jQuery.buildFragment([ma
tch[1]],[doc]);selector=(ret.cacheable?ret.
fragment.cloneNode(true):ret.fragment).childNodes;}
returnjQuery.merge(this,selector);
//HANDLE:$("#id")}else{
elem=document.getElementById(match[2]);
//CheckparentNodetocatchwhenBlackberry4.6returns
//nodesthatarenolongerinthedocum
-
7/31/2019 Cam Discussions
7/135
ent#6963if(elem&&elem.parentNode){
//HandlethecasewhereIEandOperareturnitems
//bynameinsteadofIDif(elem.id!==match[2]){
returnrootjQuery.find(selector);
}
//Otherwise,weinjecttheelementdirectlyintothejQueryobject
this.length=1;this[0]=elem;
}
this.context=document;this.selector=selector;returnthis;
}
//HANDLE:$("TAG")}elseif(!context&&!rnonword.test(selector)){
this.selector=selector;
this.context=document;selector=document.getElementsByTagName(selector);
returnjQuery.merge(this,selector);
//HANDLE:$(expr,$(...))}elseif(!context||context.jquery){
return(context||rootjQuery).find(selector);
//HANDLE:$(expr,context)//(whichisjustequivalentto:$(context).find(expr)}else{
returnjQuery(context).find(selector);
}
//HANDLE:$(function)//Shortcutfordocumentready}elseif(jQuery.isFunction(selector)){
returnrootjQuery.ready(selector);}
if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;
}
returnjQuery.makeArray(selector,this);},
//Startwithanemptyselectorselector:"",
//ThecurrentversionofjQuerybeingusedjquery:"1.4.4",
//ThedefaultlengthofajQueryobjectis0
-
7/31/2019 Cam Discussions
8/135
length:0,
//Thenumberofelementscontainedinthematchedelementsetsize:function(){
returnthis.length;},
toArray:function(){returnslice.call(this,0);
},
//GettheNthelementinthematchedelementsetOR//Getthewholematchedelementsetasacleanarrayget:function(num){
returnnum==null?
//Returna'clean'arraythis.toArray():
//Returnjusttheobject(num
-
7/31/2019 Cam Discussions
9/135
ready:function(fn){//AttachthelistenersjQuery.bindReady();
//IftheDOMisalreadyreadyif(jQuery.isReady){
//Executethefunctionimmediatelyfn.call(document,jQuery);
//Otherwise,rememberthefunctionforlater}elseif(readyList){
//AddthefunctiontothewaitlistreadyList.push(fn);
}
returnthis;},
eq:function(i){returni===-1?
this.slice(i):this.slice(i,+i+1);
},
first:function(){returnthis.eq(0);},
last:function(){returnthis.eq(-1);
},
slice:function(){returnthis.pushStack(slice.apply(this,arguments),
"slice",slice.call(arguments).join(","));},
map:function(callback){returnthis.pushStack(jQuery.map(this,function(elem,i){returncallback.call(elem,i,elem);
}));},
end:function(){returnthis.prevObject||jQuery(null);
},
//Forinternaluseonly.//BehaveslikeanArray'smethod,notlikeajQuerymethod.push:push,
sort:[].sort,splice:[].splice
};
//GivetheinitfunctionthejQueryprototypeforlaterinstantiationjQuery.fn.init.prototype=jQuery.fn;
jQuery.extend=jQuery.fn.extend=function(){varoptions,name,src,copy,copyIsArray,clone,
target=arguments[0]||{},
-
7/31/2019 Cam Discussions
10/135
i=1,length=arguments.length,deep=false;
//Handleadeepcopysituationif(typeoftarget==="boolean"){
deep=target;target=arguments[1]||{};//skipthebooleanandthetargeti=2;
}
//Handlecasewhentargetisastringorsomething(possibleindeepcopy)
if(typeoftarget!=="object"&&!jQuery.isFunction(target)){target={};
}
//extendjQueryitselfifonlyoneargumentispassedif(length===i){
target=this;--i;
}
for(;i
-
7/31/2019 Cam Discussions
11/135
}}
}
//Returnthemodifiedobjectreturntarget;
};
jQuery.extend({noConflict:function(deep){
window.$=_$;
if(deep){window.jQuery=_jQuery;
}
returnjQuery;},
//IstheDOMreadytobeused?Settotrueonceitoccurs.isReady:false,
//Acountertotrackhowmanyitemstowaitforbefore//thereadyeventfires.See#6781
readyWait:1,
//HandlewhentheDOMisreadyready:function(wait){
//Athird-partyispushingthereadyeventforwardsif(wait===true){
jQuery.readyWait--;}
//MakesurethattheDOMisnotalreadyloadedif(!jQuery.readyWait||(wait!==true&&!jQuery.isReady)){
//Makesurebodyexists,atleast,incaseIEgetsalittleoverzealous(ticket#5443).
if(!document.body){returnsetTimeout(jQuery.ready,1);}
//RememberthattheDOMisreadyjQuery.isReady=true;
//IfanormalDOMReadyeventfired,decrement,andwaitifneedbe
if(wait!==true&&--jQuery.readyWait>0){return;
}
//Iftherearefunctionsbound,toexecuteif(readyList){
//Executeallofthemvarfn,
i=0,ready=readyList;
//ResetthelistoffunctionsreadyList=null;
-
7/31/2019 Cam Discussions
12/135
while((fn=ready[i++])){fn.call(document,jQuery);
}
//Triggeranyboundreadyeventsif(jQuery.fn.trigger){
jQuery(document).trigger("ready").unbind("ready");
}}
}},
bindReady:function(){if(readyBound){
return;}
readyBound=true;
//Catchcaseswhere$(document).ready()iscalledafterthe//browsereventhasalreadyoccurred.if(document.readyState==="complete"){
//Handleitasynchronouslytoallowscriptstheopportu
nitytodelayready returnsetTimeout(jQuery.ready,1);}
//Mozilla,Operaandwebkitnightliescurrentlysupportthisevent
if(document.addEventListener){//Usethehandyeventcallbackdocument.addEventListener("DOMContentLoaded",DOMConten
tLoaded,false);
//Afallbacktowindow.onload,thatwillalwaysworkwindow.addEventListener("load",jQuery.ready,false);
//IfIEeventmodelisused}elseif(document.attachEvent){
//ensurefiringbeforeonload,//maybelatebutsafealsoforiframesdocument.attachEvent("onreadystatechange",DOMContentLoa
ded);
//Afallbacktowindow.onload,thatwillalwaysworkwindow.attachEvent("onload",jQuery.ready);
//IfIEandnotaframe//continuallychecktoseeifthedocumentisready
vartoplevel=false;
try{toplevel=window.frameElement==null;
}catch(e){}
if(document.documentElement.doScroll&&toplevel){doScrollCheck();
}}
-
7/31/2019 Cam Discussions
13/135
},
//Seetest/unit/core.jsfordetailsconcerningisFunction.//Sinceversion1.3,DOMmethodsandfunctionslikealert//aren'tsupported.TheyreturnfalseonIE(#2968).isFunction:function(obj){
returnjQuery.type(obj)==="function";},
isArray:Array.isArray||function(obj){returnjQuery.type(obj)==="array";
},
//AcrudewayofdeterminingifanobjectisawindowisWindow:function(obj){
returnobj&&typeofobj==="object"&&"setInterval"inobj;},
isNaN:function(obj){returnobj==null||!rdigit.test(obj)||isNaN(obj);
},
type:function(obj){returnobj==null?
String(obj):class2type[toString.call(obj)]||"object";},
isPlainObject:function(obj){//MustbeanObject.//BecauseofIE,wealsohavetocheckthepresenceofthecons
tructorproperty.//MakesurethatDOMnodesandwindowobjectsdon'tpassthroug
h,aswellif(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQ
uery.isWindow(obj)){returnfalse;
}
//NotownconstructorpropertymustbeObjectif(obj.constructor&&
!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")
){returnfalse;
}
//Ownpropertiesareenumeratedfirstly,sotospeedup,//iflastoneisown,thenallpropertiesareown.
varkey;for(keyinobj){}
returnkey===undefined||hasOwn.call(obj,key);},
isEmptyObject:function(obj){for(varnameinobj){
returnfalse;}
-
7/31/2019 Cam Discussions
14/135
returntrue;},
error:function(msg){throwmsg;
},
parseJSON:function(data){if(typeofdata!=="string"||!data){
returnnull;}
//Makesureleading/trailingwhitespaceisremoved(IEcan'thandleit)
data=jQuery.trim(data);
//MakesuretheincomingdataisactualJSON//Logicborrowedfromhttp://json.org/json2.jsif(rvalidchars.test(data.replace(rvalidescape,"@")
.replace(rvalidtokens,"]")
.replace(rvalidbraces,""))){
//TrytousethenativeJSONparserfirstreturnwindow.JSON&&window.JSON.parse?
window.JSON.parse(data):(newFunction("return"+data))();
}else{jQuery.error("InvalidJSON:"+data);
}},
noop:function(){},
//EvalulatesascriptinaglobalcontextglobalEval:function(data){
if(data&&rnotwhite.test(data)){
//InspiredbycodebyAndreaGiammarchi//http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
varhead=document.getElementsByTagName("head")[0]||document.documentElement,
script=document.createElement("script");
script.type="text/javascript";
if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(dat
a));}else{
script.text=data;}
//UseinsertBeforeinsteadofappendChildtocircumventanIE6bug.
//Thisariseswhenabasenodeisused(#2709).head.insertBefore(script,head.firstChild);head.removeChild(script);
}},
-
7/31/2019 Cam Discussions
15/135
nodeName:function(elem,name){returnelem.nodeName&&elem.nodeName.toUpperCase()===name.toU
pperCase();},
//argsisforinternalusageonlyeach:function(object,callback,args){
varname,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object
);
if(args){if(isObj){
for(nameinobject){if(callback.apply(object[name],arg
s)===false){break;
}}
}else{for(;i
-
7/31/2019 Cam Discussions
16/135
"":text.toString().replace(trimLeft,"").replace(
trimRight,"");},
//resultsisforinternalusageonlymakeArray:function(array,results){
varret=results||[];
if(array!=null){//Thewindow,strings(andfunctions)alsohave'length
'//Theextratypeoffunctioncheckistopreventcrashes//inSafari2(See:#3039)//TweakedlogicslightlytohandleBlackberry4.7RegEx
pissues#6930vartype=jQuery.type(array);
if(array.length==null||type==="string"||type==="function"||type==="regexp"||jQuery.isWindow(array)){
push.call(ret,array);}else{
jQuery.merge(ret,array);}
}
returnret;},
inArray:function(elem,array){if(array.indexOf){
returnarray.indexOf(elem);}
for(vari=0,length=array.length;i
-
7/31/2019 Cam Discussions
17/135
returnfirst;},
grep:function(elems,callback,inv){varret=[],retVal;inv=!!inv;
//Gothroughthearray,onlysavingtheitems//thatpassthevalidatorfunctionfor(vari=0,length=elems.length;i
-
7/31/2019 Cam Discussions
18/135
r,soitcanberemovedif(fn){
proxy.guid=fn.guid=fn.guid||proxy.guid||jQuery.guid++;
}
//Soproxycanbedeclaredasanargumentreturnproxy;
},
//Mutifunctionalmethodtogetandsetvaluestoacollection//Thevalue/scanbeoptionallybyexecutedifitsafunctionaccess:function(elems,key,value,exec,fn,pass){
varlength=elems.length;
//Settingmanyattributesif(typeofkey==="object"){
for(varkinkey){jQuery.access(elems,k,key[k],exec,fn,value
);}returnelems;
}
//Settingoneattributeif(value!==undefined){//Optionally,functionvaluesgetexecutedifexecist
rueexec=!pass&&exec&&jQuery.isFunction(value);
for(vari=0;i
-
7/31/2019 Cam Discussions
19/135
browser:{}});
//Populatetheclass2typemapjQuery.each("BooleanNumberStringFunctionArrayDateRegExpObject".split(""),function(i,name){
class2type["[object"+name+"]"]=name.toLowerCase();});
browserMatch=jQuery.uaMatch(userAgent);if(browserMatch.browser){
jQuery.browser[browserMatch.browser]=true;jQuery.browser.version=browserMatch.version;
}
//Deprecated,usejQuery.browser.webkitinsteadif(jQuery.browser.webkit){
jQuery.browser.safari=true;}
if(indexOf){jQuery.inArray=function(elem,array){
returnindexOf.call(array,elem);};
}
//Verifythat\smatchesnon-breakingspaces//(IEfailsonthistest)if(!rwhite.test("\xA0")){
trimLeft=/^[\s\xA0]+/;trimRight=/[\s\xA0]+$/;
}
//AlljQueryobjectsshouldpointbacktotheserootjQuery=jQuery(document);
//Cleanupfunctionsforthedocumentreadymethod
if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoad
ed,false);jQuery.ready();
};
}elseif(document.attachEvent){DOMContentLoaded=function(){
//Makesurebodyexists,atleast,incaseIEgetsalittleoverzealous(ticket#5443).
if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLo
aded);jQuery.ready();
}};
}
//TheDOMreadycheckforInternetExplorerfunctiondoScrollCheck(){
if(jQuery.isReady){return;
-
7/31/2019 Cam Discussions
20/135
}
try{//IfIEisused,usethetrickbyDiegoPerini//http://javascript.nwbox.com/IEContentLoaded/document.documentElement.doScroll("left");
}catch(e){setTimeout(doScrollCheck,1);return;
}
//andexecuteanywaitingfunctionsjQuery.ready();
}
//ExposejQuerytotheglobalobjectreturn(window.jQuery=window.$=jQuery);
})();
(function(){
jQuery.support={};
varroot=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+jQuery.now();
div.style.display="none";div.innerHTML="a";
varall=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0],select=document.createElement("select"),
opt=select.appendChild(document.createElement("option"));
//Can'tgetbasictestsupportif(!all||!all.length||!a){
return;}
jQuery.support={//IEstripsleadingwhitespacewhen.innerHTMLisusedleadingWhitespace:div.firstChild.nodeType===3,
//Makesurethattbodyelementsaren'tautomaticallyinserted//IEwillinsertthemintoemptytables
tbody:!div.getElementsByTagName("tbody").length,
//MakesurethatlinkelementsgetserializedcorrectlybyinnerHTML
//ThisrequiresawrapperelementinIEhtmlSerialize:!!div.getElementsByTagName("link").length,
//GetthestyleinformationfromgetAttribute//(IEuses.cssTextinsted)style:/red/.test(a.getAttribute("style")),
-
7/31/2019 Cam Discussions
21/135
//MakesurethatURLsaren'tmanipulated//(IEnormalizesitbydefault)hrefNormalized:a.getAttribute("href")==="/a",
//Makesurethatelementopacityexists//(IEusesfilterinstead)//UsearegextoworkaroundaWebKitissue.See#5145opacity:/^0.55$/.test(a.style.opacity),
//Verifystylefloatexistence//(IEusesstyleFloatinsteadofcssFloat)cssFloat:!!a.style.cssFloat,
//Makesurethatifnovalueisspecifiedforacheckbox//thatitdefaultsto"on".//(WebKitdefaultsto""instead)checkOn:div.getElementsByTagName("input")[0].value==="on",
//Makesurethataselected-by-defaultoptionhasaworkingselectedproperty.
//(WebKitdefaultstofalseinsteadoftrue,IEtoo,ifit'sinanoptgroup)
optSelected:opt.selected,
//WillbedefinedlaterdeleteExpando:true,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true
};
//Makesurethattheoptionsinsidedisabledselectsaren'tmarkedasdisabled//(WebKitmarksthemasdiabled)select.disabled=true;jQuery.support.optDisabled=!opt.disabled;
script.type="text/javascript";try{
script.appendChild(document.createTextNode("window."+id+"=1;"));
}catch(e){}
root.insertBefore(script,root.firstChild);
//Makesurethattheexecutionofcodeworksbyinjectingascript//tagwithappendChild/createTextNode//(IEdoesn'tsupportthis,fails,anduses.textinstead)if(window[id]){
jQuery.support.scriptEval=true;deletewindow[id];
}
//Testtoseeifit'spossibletodeleteanexpandofromanelement
-
7/31/2019 Cam Discussions
22/135
//FailsinInternetExplorertry{
deletescript.test;
}catch(e){jQuery.support.deleteExpando=false;
}
root.removeChild(script);
if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",functionclick(){
//Cloninganodeshouldn'tcopyoverany//boundeventhandlers(IEdoesthis)jQuery.support.noCloneEvent=false;div.detachEvent("onclick",click);
});div.cloneNode(true).fireEvent("onclick");
}
div=document.createElement("div");div.innerHTML="";
varfragment=document.createDocumentFragment();fragment.appendChild(div.firstChild);
//WebKitdoesn'tclonecheckedstatecorrectlyinfragmentsjQuery.support.checkClone=fragment.cloneNode(true).cloneNode(true).las
tChild.checked;
//FigureoutiftheW3Cboxmodelworksasexpected//document.bodymustexistbeforewecandothisjQuery(function(){
vardiv=document.createElement("div");div.style.width=div.style.paddingLeft="1px";
document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;
if("zoom"indiv.style){//Checkifnativelyblock-levelelementsactlikeinlin
e-block//elementswhensettingtheirdisplayto'inline'andg
iving//themlayout//(IE
-
7/31/2019 Cam Discussions
23/135
div.innerHTML="t";
vartds=div.getElementsByTagName("td");
//CheckiftablecellsstillhaveoffsetWidth/Heightwhentheyareset
//todisplay:noneandtherearestillothervisibletablecellsina
//tablerow;ifso,offsetWidth/Heightarenotreliableforusewhen
//determiningifanelementhasbeenhiddendirectlyusing//display:none(itisstillsafetouseoffsetsifaparentele
mentis//hidden;donsafetygogglesandseebug#4512formoreinforma
tion).//(onlyIE8failsthistest)jQuery.support.reliableHiddenOffsets=tds[0].offsetHeight===0
;
tds[0].style.display="";tds[1].style.display="none";
//CheckifemptytablecellsstillhaveoffsetWidth/Height
//(IE
-
7/31/2019 Cam Discussions
24/135
rbrace=/^(?:\{.*\}|\[.*\])$/;
jQuery.extend({cache:{},
//Pleaseusewithcautionuuid:0,
//UniqueforeachcopyofjQueryonthepageexpando:"jQuery"+jQuery.now(),
//Thefollowingelementsthrowuncatchableexceptionsifyou//attempttoaddexpandopropertiestothem.noData:{
"embed":true,//BanallobjectsexceptforFlash(whichhandleexpandos)"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true
},
data:function(elem,name,data){if(!jQuery.acceptData(elem)){
return;}
elem=elem==window?windowData:elem;
varisNode=elem.nodeType,id=isNode?elem[jQuery.expando]:null,cache=jQuery.cache,thisCache;
if(isNode&&!id&&typeofname==="string"&&data===undefined){
return;}
//Getthedatafromtheobjectdirectlyif(!isNode){
cache=elem;
//ComputeauniqueIDfortheelement}elseif(!id){
elem[jQuery.expando]=id=++jQuery.uuid;}
//Avoidgeneratinganewcacheunlessnoneexistsandwe//wanttomanipulateit.if(typeofname==="object"){
if(isNode){cache[id]=jQuery.extend(cache[id],name);
}else{jQuery.extend(cache,name);
}
}elseif(isNode&&!cache[id]){cache[id]={};
}
-
7/31/2019 Cam Discussions
25/135
thisCache=isNode?cache[id]:cache;
//Preventoverridingthenamedcachewithundefinedvaluesif(data!==undefined){
thisCache[name]=data;}
returntypeofname==="string"?thisCache[name]:thisCache;},
removeData:function(elem,name){if(!jQuery.acceptData(elem)){
return;}
elem=elem==window?windowData:elem;
varisNode=elem.nodeType,id=isNode?elem[jQuery.expando]:elem,cache=jQuery.cache,thisCache=isNode?cache[id]:id;
//Ifwewanttoremoveaspecificsectionoftheelement'sdataif(name){
if(thisCache){//RemovethesectionofcachedatadeletethisCache[name];
//Ifwe'veremovedallthedata,removetheelement'scache
if(isNode&&jQuery.isEmptyObject(thisCache)){
jQuery.removeData(elem);}
}
//Otherwise,wewanttoremovealloftheelement'sdata}else{
if(isNode&&jQuery.support.deleteExpando){deleteelem[jQuery.expando];
}elseif(elem.removeAttribute){elem.removeAttribute(jQuery.expando);
//Completelyremovethedatacache}elseif(isNode){
deletecache[id];
//Removeallfieldsfromtheobject}else{
for(varninelem){deleteelem[n];
}}
}},
-
7/31/2019 Cam Discussions
26/135
//AmethodfordeterminingifaDOMnodecanhandlethedataexpandoacceptData:function(elem){
if(elem.nodeName){varmatch=jQuery.noData[elem.nodeName.toLowerCase()]
;
if(match){return!(match===true||elem.getAttribute("cl
assid")!==match);}
}
returntrue;}
});
jQuery.fn.extend({data:function(key,value){
vardata=null;
if(typeofkey==="undefined"){if(this.length){
varattr=this[0].attributes,name;data=jQuery.data(this[0]);
for(vari=0,l=attr.length;i
-
7/31/2019 Cam Discussions
27/135
}else{returnthis.each(function(){
var$this=jQuery(this),args=[parts[0],value];
$this.triggerHandler("setData"+parts[1]+"!",args);
jQuery.data(this,key,value);$this.triggerHandler("changeData"+parts[1]+
"!",args);});
}},
removeData:function(key){returnthis.each(function(){
jQuery.removeData(this,key);});
}});
functiondataAttr(elem,key,data){//Ifnothingwasfoundinternally,trytofetchany
//datafromtheHTML5data-*attributeif(data===undefined&&elem.nodeType===1){data=elem.getAttribute("data-"+key);
if(typeofdata==="string"){try{
data=data==="true"?true:data==="false"?false:data==="null"?null:!jQuery.isNaN(data)?parseFloat(data):
rbrace.test(data)?jQuery.parseJSON(data):
data;
}catch(e){}
//Makesurewesetthedatasoitisn'tchangedlaterjQuery.data(elem,key,data);
}else{data=undefined;
}}
returndata;}
jQuery.extend({queue:function(elem,type,data){
if(!elem){return;
}
type=(type||"fx")+"queue";
-
7/31/2019 Cam Discussions
28/135
varq=jQuery.data(elem,type);
//Speedupdequeuebygettingoutquicklyifthisisjustalookup
if(!data){returnq||[];
}
if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));
}else{q.push(data);
}
returnq;},
dequeue:function(elem,type){type=type||"fx";
varqueue=jQuery.queue(elem,type),fn=queue.shift();
//Ifthefxqueueisdequeued,alwaysremovetheprogresssentinelif(fn==="inprogress"){
fn=queue.shift();}
if(fn){//Addaprogresssentineltopreventthefxqueuefrom
being//automaticallydequeuedif(type==="fx"){
queue.unshift("inprogress");}
fn.call(elem,function(){jQuery.dequeue(elem,type);
});}
}});
jQuery.fn.extend({queue:function(type,data){
if(typeoftype!=="string"){data=type;type="fx";
}
if(data===undefined){returnjQuery.queue(this[0],type);
}returnthis.each(function(i){
varqueue=jQuery.queue(this,type,data);
if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);
-
7/31/2019 Cam Discussions
29/135
}});
},dequeue:function(type){
returnthis.each(function(){jQuery.dequeue(this,type);
});},
//BasedoffofthepluginbyClintHelfers,withpermission.//http://blindsignals.com/index.php/2009/07/jquery-delay/delay:function(time,type){
time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";
returnthis.queue(type,function(){varelem=this;setTimeout(function(){
jQuery.dequeue(elem,type);},time);
});},
clearQueue:function(type){
returnthis.queue(type||"fx",[]);}});
varrclass=/[\n\t]/g,rspaces=/\s+/,rreturn=/\r/g,rspecialurl=/^(?:href|src|style)$/,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,
rclickable=/^a(?:rea)?$/i,rradiocheck=/^(?:radio|checkbox)$/i;
jQuery.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",
frameborder:"frameBorder"};
jQuery.fn.extend({attr:function(name,value){
returnjQuery.access(this,name,value,true,jQuery.attr);},
removeAttr:function(name,fn){returnthis.each(function(){
-
7/31/2019 Cam Discussions
30/135
jQuery.attr(this,name,"");if(this.nodeType===1){
this.removeAttribute(name);}
});},
addClass:function(value){if(jQuery.isFunction(value)){
returnthis.each(function(i){varself=jQuery(this);self.addClass(value.call(this,i,self.attr("cl
ass")));});
}
if(value&&typeofvalue==="string"){varclassNames=(value||"").split(rspaces);
for(vari=0,l=this.length;i
-
7/31/2019 Cam Discussions
31/135
){varclassNames=(value||"").split(rspaces);
for(vari=0,l=this.length;i
-
7/31/2019 Cam Discussions
32/135
if(this.className){//storeclassNameifsetjQuery.data(this,"__className__",this
.className);}
//togglewholeclassNamethis.className=this.className||value===fal
se?"":jQuery.data(this,"__className__")||"";}
});},
hasClass:function(selector){varclassName=""+selector+"";for(vari=0,l=this.length;i-1){
returntrue;}
}
returnfalse;},
val:function(value){if(!arguments.length){
varelem=this[0];
if(elem){if(jQuery.nodeName(elem,"option")){
//attributes.valueisundefinedinBlackberry4.7but
//uses.value.See#6932varval=elem.attributes.value;return!val||val.specified?elem.valu
e:elem.text;
}
//Weneedtohandleselectboxesspecialif(jQuery.nodeName(elem,"select")){
varindex=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one"
;
//Nothingwasselectedif(index
-
7/31/2019 Cam Discussions
33/135
support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&
(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){
//Getthespecificvaluefortheoption
value=jQuery(option).val();
//Wedon'tneedanarrayforoneselects
if(one){returnvalue;
}
//Multi-Selectsreturnanarray
values.push(value);}
}
returnvalues;}
//HandlethecasewhereinWebkit""isreturnedinsteadof"on"ifavalueisn'tspecified
if(rradiocheck.test(elem.type)&&!jQuery.support.checkOn){
returnelem.getAttribute("value")===null?"on":elem.value;
}
//Everythingelse,wejustgrabthevaluereturn(elem.value||"").replace(rreturn,"");
}
returnundefined;}
varisFunction=jQuery.isFunction(value);
returnthis.each(function(i){varself=jQuery(this),val=value;
if(this.nodeType!==1){return;
}
if(isFunction){val=value.call(this,i,self.val());
}
//Treatnull/undefinedas"";convertnumberstostringif(val==null){
val="";}elseif(typeofval==="number"){
val+="";
-
7/31/2019 Cam Discussions
34/135
}elseif(jQuery.isArray(val)){val=jQuery.map(val,function(value){
returnvalue==null?"":value+"";});
}
if(jQuery.isArray(val)&&rradiocheck.test(this.type)){
this.checked=jQuery.inArray(self.val(),val)>=0;
}elseif(jQuery.nodeName(this,"select")){varvalues=jQuery.makeArray(val);
jQuery("option",this).each(function(){this.selected=jQuery.inArray(jQuery(t
his).val(),values)>=0;});
if(!values.length){this.selectedIndex=-1;
}
}else{
this.value=val;}});
}});
jQuery.extend({attrFn:{
val:true,css:true,html:true,text:true,data:true,
width:true,height:true,offset:true
},
attr:function(elem,name,value,pass){//don'tsetattributesontextandcommentnodesif(!elem||elem.nodeType===3||elem.nodeType===8){
returnundefined;}
if(pass&&nameinjQuery.attrFn){returnjQuery(elem)[name](value);
}
varnotxml=elem.nodeType!==1||!jQuery.isXMLDoc(elem),//Whetherwearesetting(orgetting)set=value!==undefined;
//Trytonormalize/fixthenamename=notxml&&jQuery.props[name]||name;
//Theseattributesrequirespecialtreatment
-
7/31/2019 Cam Discussions
35/135
-
7/31/2019 Cam Discussions
36/135
0:undefined;
}
returnelem[name];}
if(!jQuery.support.style&¬xml&&name==="style"){if(set){
elem.style.cssText=""+value;}
returnelem.style.cssText;}
if(set){//convertthevaluetoastring(allbrowsersdothisb
utIE)see#1070elem.setAttribute(name,""+value);
}
//Ensurethatmissingattributesreturnundefined//Blackberry4.7returns""fromgetAttribute#6938if(!elem.attributes[name]&&(elem.hasAttribute&&!elem.has
Attribute(name))){ returnundefined;}
varattr=!jQuery.support.hrefNormalized&¬xml&&special?//SomeattributesrequireaspecialcallonIEelem.getAttribute(name,2):elem.getAttribute(name);
//Non-existentattributesreturnnull,wenormalizetoundefined
returnattr===null?undefined:attr;}
});
varrnamespaces=/\.(.*)$/,rformElems=/^(?:textarea|input|select)$/i,rperiod=/\./g,rspace=//g,rescape=/[^\w\s.|`]/g,fcleanup=function(nm){
returnnm.replace(rescape,"\\$&");},
focusCounts={focusin:0,focusout:0};
/**Anumberofhelperfunctionsusedformanagingevents.*Manyoftheideasbehindthiscodeoriginatedfrom*DeanEdwards'addEventlibrary.*/jQuery.event={
//Bindaneventtoanelement
-
7/31/2019 Cam Discussions
37/135
//OriginalbyDeanEdwardsadd:function(elem,types,handler,data){
if(elem.nodeType===3||elem.nodeType===8){return;
}
//Forwhateverreason,IEhastroublepassingthewindowobject//around,causingittobeclonedintheprocessif(jQuery.isWindow(elem)&&(elem!==window&&!elem.frame
Element)){elem=window;
}
if(handler===false){handler=returnFalse;
}elseif(!handler){//Fixesbug#7229.Fixrecommendedbyjdalton
return;}
varhandleObjIn,handleObj;
if(handler.handler){handleObjIn=handler;
handler=handleObjIn.handler;}
//MakesurethatthefunctionbeingexecutedhasauniqueIDif(!handler.guid){
handler.guid=jQuery.guid++;}
//Inittheelement'seventstructurevarelemData=jQuery.data(elem);
//IfnoelemDataisfoundthenwemustbetryingtobindtooneofthe
//bannednoDataelementsif(!elemData){return;
}
//UseakeylesslikelytoresultincollisionsforplainJSobjects.
//Fixesbug#7150.vareventKey=elem.nodeType?"events":"__events__",
events=elemData[eventKey],eventHandle=elemData.handle;
if(typeofevents==="function"){
//Onplainobjectseventsisafnthatholdsthethedata
//whichpreventsthisdatafrombeingJSONserialized//thefunctiondoesnotneedtobecalled,itjustcont
ainsthedataeventHandle=events.handle;events=events.events;
}elseif(!events){if(!elem.nodeType){
-
7/31/2019 Cam Discussions
38/135
-
7/31/2019 Cam Discussions
39/135
if(!handlers){handlers=events[type]=[];
//Checkforaspecialeventhandler//OnlyuseaddEventListener/attachEventifthe
special//eventshandlerreturnsfalseif(!special.setup||special.setup.call(elem,
data,namespaces,eventHandle)===false){//Bindtheglobaleventhandlertothe
elementif(elem.addEventListener){
elem.addEventListener(type,eventHandle,false);
}elseif(elem.attachEvent){elem.attachEvent("on"+type,e
ventHandle);}
}}
if(special.add){special.add.call(elem,handleObj);
if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;
}}
//Addthefunctiontotheelement'shandlerlisthandlers.push(handleObj);
//Keeptrackofwhicheventshavebeenused,forglobaltriggering
jQuery.event.global[type]=true;}
//NullifyelemtopreventmemoryleaksinIEelem=null;
},
global:{},
//Detachaneventorsetofeventsfromanelementremove:function(elem,types,handler,pos){
//don'tdoeventsontextandcommentnodesif(elem.nodeType===3||elem.nodeType===8){
return;}
if(handler===false){handler=returnFalse;
}
varret,type,fn,j,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,
eventKey=elem.nodeType?"events":"__events__",elemData=jQuery.data(elem),events=elemData&&elemData[eventKey];
-
7/31/2019 Cam Discussions
40/135
if(!elemData||!events){return;
}
if(typeofevents==="function"){elemData=events;events=events.events;
}
//typesisactuallyaneventobjecthereif(types&&types.type){
handler=types.handler;types=types.type;
}
//Unbindalleventsfortheelementif(!types||typeoftypes==="string"&&types.charAt(0)===
"."){types=types||"";
for(typeinevents){jQuery.event.remove(elem,type+types);
}
return;}
//Handlemultipleeventsseparatedbyaspace//jQuery(...).unbind("mouseovermouseout",fn);types=types.split("");
while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")
-
7/31/2019 Cam Discussions
41/135
jQuery.event.remove(elem,origType,handleObj.handler,j);
eventType.splice(j--,1);}
}
continue;}
special=jQuery.event.special[type]||{};
for(j=pos||0;j
-
7/31/2019 Cam Discussions
42/135
if(typeofelemData==="function"){jQuery.removeData(elem,eventKey);
}elseif(jQuery.isEmptyObject(elemData)){jQuery.removeData(elem);
}}
},
//bubblingisinternaltrigger:function(event,data,elem/*,bubbling*/){
//Eventobjectoreventtypevartype=event.type||event,
bubbling=arguments[3];
if(!bubbling){event=typeofevent==="object"?
//jQuery.Eventobjectevent[jQuery.expando]?event://ObjectliteraljQuery.extend(jQuery.Event(type),event)://Justtheeventtype(string)jQuery.Event(type);
if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;
}
//Handleaglobaltriggerif(!elem){
//Don'tbubblecustomeventswhenglobal(toavoidtoomuchoverhead)
event.stopPropagation();
//Onlytriggerifwe'veeverboundaneventfor
it if(jQuery.event.global[type]){jQuery.each(jQuery.cache,function(){
if(this.events&&this.events[type]){
jQuery.event.trigger(event,data,this.handle.elem);
}});
}}
//Handletriggeringasingleelement
//don'tdoeventsontextandcommentnodesif(!elem||elem.nodeType===3||elem.nodeType===8
){returnundefined;
}
//Cleanupincaseitisreusedevent.result=undefined;event.target=elem;
-
7/31/2019 Cam Discussions
43/135
//Clonetheincomingdata,ifanydata=jQuery.makeArray(data);data.unshift(event);
}
event.currentTarget=elem;
//Triggertheevent,itisassumedthat"handle"isafunctionvarhandle=elem.nodeType?
jQuery.data(elem,"handle"):(jQuery.data(elem,"__events__")||{}).handle;
if(handle){handle.apply(elem,data);
}
varparent=elem.parentNode||elem.ownerDocument;
//Triggeraninlineboundscripttry{
if(!(elem&&elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()])){
if(elem["on"+type]&&elem["on"+type].
apply(elem,data)===false){ event.result=false;event.preventDefault();
}}
//preventIEfromthrowinganerrorforsomeelementswithsomeeventtypes,see#3533
}catch(inlineError){}
if(!event.isPropagationStopped()&&parent){jQuery.event.trigger(event,data,parent,true);
}elseif(!event.isDefaultPrevented()){varold,target=event.target,targetType=type.replace(rnamespaces,""),isClick=jQuery.nodeName(target,"a")&&targ
etType==="click",special=jQuery.event.special[targetType]||
{};
if((!special._default||special._default.call(elem,event)===false)&&
!isClick&&!(target&&target.nodeName&&jQuery.noData[target.nodeName.toLowerCase()])){
try{if(target[targetType]){
//Makesurethatwedon'taccidentallyre-triggertheonFOOevents
old=target["on"+targetType];
if(old){target["on"+targetTyp
-
7/31/2019 Cam Discussions
44/135
e]=null;}
jQuery.event.triggered=true;target[targetType]();
}
//preventIEfromthrowinganerrorforsomeelementswithsomeeventtypes,see#3533
}catch(triggerError){}
if(old){target["on"+targetType]=old;
}
jQuery.event.triggered=false;}
}},
handle:function(event){varall,handlers,namespaces,namespace_re,events,
namespace_sort=[],args=jQuery.makeArray(arguments);
event=args[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;
//Namespacedeventhandlersall=event.type.indexOf(".")
-
7/31/2019 Cam Discussions
45/135
//Passinareferencetothehandlerfunctionitself
//Sothatwecanlaterremoveitevent.handler=handleObj.handler;event.data=handleObj.data;event.handleObj=handleObj;
varret=handleObj.handler.apply(this,args);
if(ret!==undefined){event.result=ret;if(ret===false){
event.preventDefault();event.stopPropagation();
}}
if(event.isImmediatePropagationStopped()){
break;}
}}
}
returnevent.result;},
props:"altKeyattrChangeattrNamebubblesbuttoncancelablecharCodeclientXclientYctrlKeycurrentTargetdatadetaileventPhasefromElementhandlerkeyCodelayerXlayerYmetaKeynewValueoffsetXoffsetYpageXpageYprevValuerelatedNoderelatedTargetscreenXscreenYshiftKeysrcElementtargettoElementviewwheelDeltawhich".split(""),
fix:function(event){if(event[jQuery.expando]){
returnevent;}
//storeacopyoftheoriginaleventobject//and"clone"tosetread-onlypropertiesvaroriginalEvent=event;event=jQuery.Event(originalEvent);
for(vari=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];
}
//Fixtargetproperty,ifnecessaryif(!event.target){
//Fixes#1925wheresrcElementmightnotbedefinedeither
event.target=event.srcElement||document;}
//checkiftargetisatextnode(safari)if(event.target.nodeType===3){
event.target=event.target.parentNode;
-
7/31/2019 Cam Discussions
46/135
}
//AddrelatedTarget,ifnecessaryif(!event.relatedTarget&&event.fromElement){
event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;
}
//CalculatepageX/YifmissingandclientX/Yavailableif(event.pageX==null&&event.clientX!=null){
vardoc=document.documentElement,body=document.body;
event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);
event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);
}
//Addwhichforkeyeventsif(event.which==null&&(event.charCode!=null||event.key
Code!=null)){
event.which=event.charCode!=null?event.charCode:event.keyCode;}
//AddmetaKeytonon-Macbrowsers(usectrlforPC'sandMetaforMacs)
if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;
}
//Addwhichforclick:1===left;2===middle;3===right//Note:buttonisnotnormalized,sodon'tuseitif(!event.which&&event.button!==undefined){
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}
returnevent;},
//Deprecated,usejQuery.guidinsteadguid:1E8,
//Deprecated,usejQuery.proxyinsteadproxy:jQuery.proxy,
special:{ready:{
//Makesurethereadyeventissetupsetup:jQuery.bindReady,teardown:jQuery.noop
},
live:{add:function(handleObj){
jQuery.event.add(this,
-
7/31/2019 Cam Discussions
47/135
liveConvert(handleObj.origType,handleObj.selector),
jQuery.extend({},handleObj,{handler:liveHandler,guid:handleObj.handler.guid}));
},
remove:function(handleObj){jQuery.event.remove(this,liveConvert(handleOb
j.origType,handleObj.selector),handleObj);}
},
beforeunload:{setup:function(data,namespaces,eventHandle){
//Weonlywanttodothisspecialcaseonwindows
if(jQuery.isWindow(this)){this.onbeforeunload=eventHandle;
}},
teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){
this.onbeforeunload=null;
}}}
}};
jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){
if(elem.removeEventListener){elem.removeEventListener(type,handle,false);
}}:function(elem,type,handle){
if(elem.detachEvent){elem.detachEvent("on"+type,handle);}
};
jQuery.Event=function(src){//Allowinstantiationwithoutthe'new'keywordif(!this.preventDefault){
returnnewjQuery.Event(src);}
//Eventobjectif(src&&src.type){
this.originalEvent=src;this.type=src.type;
//Eventtype}else{
this.type=src;}
//timeStampisbuggyforsomeeventsonFirefox(#3843)//Sowewon'trelyonthenativevaluethis.timeStamp=jQuery.now();
-
7/31/2019 Cam Discussions
48/135
//Markitasfixedthis[jQuery.expando]=true;
};
functionreturnFalse(){returnfalse;
}functionreturnTrue(){
returntrue;}
//jQuery.EventisbasedonDOM3EventsasspecifiedbytheECMAScriptLanguageBinding//http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.htmljQuery.Event.prototype={
preventDefault:function(){this.isDefaultPrevented=returnTrue;
vare=this.originalEvent;if(!e){
return;}
//ifpreventDefaultexistsrunitontheoriginaleventif(e.preventDefault){
e.preventDefault();
//otherwisesetthereturnValuepropertyoftheoriginaleventtofalse(IE)
}else{e.returnValue=false;
}},stopPropagation:function(){
this.isPropagationStopped=returnTrue;
vare=this.originalEvent;if(!e){
return;}//ifstopPropagationexistsrunitontheoriginaleventif(e.stopPropagation){
e.stopPropagation();}//otherwisesetthecancelBubblepropertyoftheoriginalevent
totrue(IE)e.cancelBubble=true;
},
stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();
},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse
};
//Checksifaneventhappenedonanelementwithinanotherelement
-
7/31/2019 Cam Discussions
49/135
//UsedinjQuery.event.special.mouseenterandmouseleavehandlersvarwithinElement=function(event){
//Checkifmouse(over|out)arestillwithinthesameparentelementvarparent=event.relatedTarget;
//FirefoxsometimesassignsrelatedTargetaXULelement//whichwecannotaccesstheparentNodepropertyoftry{
//Traverseupthetreewhile(parent&&parent!==this){
parent=parent.parentNode;}
if(parent!==this){//setthecorrecteventtypeevent.type=event.data;
//handleeventifweactuallyjustmousedontoanonsub-element
jQuery.event.handle.apply(this,arguments);}
//assumingwe'velefttheelementsincewemostlikelymousedoveraxulelement
}catch(e){}},
//Incaseofeventdelegation,weonlyneedtorenametheevent.type,//liveHandlerwilltakecareoftherest.delegate=function(event){
event.type=event.data;jQuery.event.handle.apply(this,arguments);
};
//CreatemouseenterandmouseleaveeventsjQuery.each({
mouseenter:"mouseover",
mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={
setup:function(data){jQuery.event.add(this,fix,data&&data.selector?del
egate:withinElement,orig);},teardown:function(data){
jQuery.event.remove(this,fix,data&&data.selector?delegate:withinElement);
}};
});
//submitdelegationif(!jQuery.support.submitBubbles){
jQuery.event.special.submit={setup:function(data,namespaces){
if(this.nodeName.toLowerCase()!=="form"){jQuery.event.add(this,"click.specialSubmit",fu
nction(e){varelem=e.target,
-
7/31/2019 Cam Discussions
50/135
type=elem.type;
if((type==="submit"||type==="image")&&jQuery(elem).closest("form").length){
e.liveFired=undefined;returntrigger("submit",this,
arguments);}
});
jQuery.event.add(this,"keypress.specialSubmit",function(e){
varelem=e.target,type=elem.type;
if((type==="text"||type==="password")&&jQuery(elem).closest("form").length&&e.keyCode===13){
e.liveFired=undefined;returntrigger("submit",this,
arguments);}
});
}else{
returnfalse;}},
teardown:function(namespaces){jQuery.event.remove(this,".specialSubmit");
}};
}
//changedelegation,happensheresowehavebind.if(!jQuery.support.changeBubbles){
varchangeFilters,
getVal=function(elem){vartype=elem.type,val=elem.value;
if(type==="radio"||type==="checkbox"){val=elem.checked;
}elseif(type==="select-multiple"){val=elem.selectedIndex>-1?
jQuery.map(elem.options,function(elem){returnelem.selected;
}).join("-"):"";
}elseif(elem.nodeName.toLowerCase()==="select"){val=elem.selectedIndex;
}
returnval;},
-
7/31/2019 Cam Discussions
51/135
testChange=functiontestChange(e){varelem=e.target,data,val;
if(!rformElems.test(elem.nodeName)||elem.readOnly){return;
}
data=jQuery.data(elem,"_change_data");val=getVal(elem);
//thecurrentdatawillbealsoretrievedbybeforeactivateif(e.type!=="focusout"||elem.type!=="radio"){
jQuery.data(elem,"_change_data",val);}
if(data===undefined||val===data){return;
}
if(data!=null||val){e.type="change";e.liveFired=undefined;returnjQuery.event.trigger(e,arguments[1],elem);
}
};
jQuery.event.special.change={filters:{
focusout:testChange,
beforedeactivate:testChange,
click:function(e){varelem=e.target,type=elem.type;
if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){
returntestChange.call(this,e);}},
//Changehastobecalledbeforesubmit//Keydownwillbecalledbeforekeypress,whichisused
insubmit-eventdelegationkeydown:function(e){
varelem=e.target,type=elem.type;
if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||
(e.keyCode===32&&(type==="checkbox
"||type==="radio"))||type==="select-multiple"){returntestChange.call(this,e);
}},
//Beforeactivatehappensalsobeforethepreviouselementisblurred
//withthiseventyoucan'ttriggerachangeevent,butyoucanstore
-
7/31/2019 Cam Discussions
52/135
//informationbeforeactivate:function(e){
varelem=e.target;jQuery.data(elem,"_change_data",getVal(elem)
);}
},
setup:function(data,namespaces){if(this.type==="file"){
returnfalse;}
for(vartypeinchangeFilters){jQuery.event.add(this,type+".specialChange",
changeFilters[type]);}
returnrformElems.test(this.nodeName);},
teardown:function(namespaces){jQuery.event.remove(this,".specialChange");
returnrformElems.test(this.nodeName);}};
changeFilters=jQuery.event.special.change.filters;
//Handlewhentheinputis.focus()'dchangeFilters.focus=changeFilters.beforeactivate;
}
functiontrigger(type,elem,args){args[0].type=type;returnjQuery.event.handle.apply(elem,args);
}
//Create"bubbling"focusandblureventsif(document.addEventListener){
jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){
jQuery.event.special[fix]={setup:function(){
if(focusCounts[fix]++===0){document.addEventListener(orig,handler
,true);}
},
teardown:function(){if(--focusCounts[fix]===0){
document.removeEventListener(orig,handler,true);
}}
};
functionhandler(e){e=jQuery.event.fix(e);
-
7/31/2019 Cam Discussions
53/135
e.type=fix;returnjQuery.event.trigger(e,null,e.target);
}});
}
jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=function(type,data,fn){
//Handleobjectliteralsif(typeoftype==="object"){
for(varkeyintype){this[name](key,data,type[key],fn);
}returnthis;
}
if(jQuery.isFunction(data)||data===false){fn=data;data=undefined;
}
varhandler=name==="one"?jQuery.proxy(fn,function(event){
jQuery(this).unbind(event,handler);
returnfn.apply(this,arguments);}):fn;
if(type==="unload"&&name!=="one"){this.one(type,data,fn);
}else{for(vari=0,l=this.length;i
-
7/31/2019 Cam Discussions
54/135
},
undelegate:function(selector,types,fn){if(arguments.length===0){
returnthis.unbind("live");
}else{returnthis.die(types,null,fn,selector);
}},
trigger:function(type,data){returnthis.each(function(){
jQuery.event.trigger(type,data,this);});
},
triggerHandler:function(type,data){if(this[0]){
varevent=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);returnevent.result;
}},
toggle:function(fn){//Savereferencetoargumentsforaccessinclosurevarargs=arguments,
i=1;
//linkallthefunctions,soanyofthemcanunbindthisclickhandler
while(i
-
7/31/2019 Cam Discussions
55/135
focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"
};
jQuery.each(["live","die"],function(i,name){jQuery.fn[name]=function(types,data,fn,origSelector/*Internal
UseOnly*/){vartype,i=0,match,namespaces,preType,
selector=origSelector||this.selector,context=origSelector?this:jQuery(this.context);
if(typeoftypes==="object"&&!types.preventDefault){for(varkeyintypes){
context[name](key,data,types[key],selector);
}
returnthis;}
if(jQuery.isFunction(data)){fn=data;
data=undefined;}
types=(types||"").split("");
while((type=types[i++])!=null){match=rnamespaces.exec(type);namespaces="";
if(match){namespaces=match[0];type=type.replace(rnamespaces,"");
}
if(type==="hover"){types.push("mouseenter"+namespaces,"mouselea
ve"+namespaces);continue;
}
preType=type;
if(type==="focus"||type==="blur"){types.push(liveMap[type]+namespaces);type=type+namespaces;
}else{type=(liveMap[type]||type)+namespaces;
}
if(name==="live"){//bindlivehandlerfor(varj=0,l=context.length;j
-
7/31/2019 Cam Discussions
56/135
-
7/31/2019 Cam Discussions
57/135
-
7/31/2019 Cam Discussions
58/135
"mousedownmouseupmousemovemouseovermouseoutmouseentermouseleave"+
"changeselectsubmitkeydownkeypresskeyuperror").split(""),function(i,name){
//HandleeventbindingjQuery.fn[name]=function(data,fn){
if(fn==null){fn=data;data=null;
}
returnarguments.length>0?this.bind(name,data,fn):this.trigger(name);
};
if(jQuery.attrFn){jQuery.attrFn[name]=true;
}});
//PreventmemoryleaksinIE//Windowisn'tincludedsoasnottounbindexistingunloadevents
//Moreinfo://-http://isaacschlueter.com/2006/10/msie-memory-leaks/if(window.attachEvent&&!window.addEventListener){
jQuery(window).bind("unload",function(){for(varidinjQuery.cache){
if(jQuery.cache[id].handle){//Try/Catchistohandleiframesbeingunloaded
,see#4280try{
jQuery.event.remove(jQuery.cache[id].handle.elem);
}catch(e){}}
}});}
/*!*SizzleCSSSelectorEngine-v1.0*Copyright2009,TheDojoFoundation*ReleasedundertheMIT,BSD,andGPLLicenses.*Moreinformation:http://sizzlejs.com/*/(function(){
varchunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^>+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;
//HerewecheckiftheJavaScriptengineisusingsomesortof//optimizationwhereitdoesnotalwayscallourcomparision//function.Ifthatisthecase,discardthehasDuplicatevalue.
-
7/31/2019 Cam Discussions
59/135
-
7/31/2019 Cam Discussions
60/135
-
7/31/2019 Cam Discussions
61/135
if(!checkSet){checkSet=set;
}
if(!checkSet){Sizzle.error(cur||selector);
}
if(toString.call(checkSet)==="[objectArray]"){if(!prune){
results.push.apply(results,checkSet);
}elseif(context&&context.nodeType===1){for(i=0;checkSet[i]!=null;i++){
if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){
results.push(set[i]);}
}
}else{for(i=0;checkSet[i]!=null;i++){
if(checkSet[i]&&checkSet[i].nodeType===1){
results.push(set[i]);}}
}
}else{makeArray(checkSet,results);
}
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);
}
returnresults;};
Sizzle.uniqueSort=function(results){if(sortOrder){
hasDuplicate=baseHasDuplicate;results.sort(sortOrder);
if(hasDuplicate){for(vari=1;i
-
7/31/2019 Cam Discussions
62/135
};
Sizzle.matchesSelector=function(node,expr){returnSizzle(expr,null,null,[node]).length>0;
};
Sizzle.find=function(expr,context,isXML){varset;
if(!expr){return[];
}
for(vari=0,l=Expr.order.length;i
-
7/31/2019 Cam Discussions
63/135
if(left.substr(left.length-1)==="\\"){continue;
}
if(curLoop===result){result=[];
}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,c
urLoop,inplace,result,not,isXMLFilter);
if(!match){anyFound=found=true;
}elseif(match===true){continue;
}}
if(match){for(vari=0;(item=curLoop[i])!=
null;i++){
if(item){found=filter(item,match,i,curLoop);
varpass=not^!!found;
if(inplace&&found!=null){
if(pass){anyFound
=true;
}else{
curLoop[i]=false;}
}elseif(pass){result.push(ite
m);anyFound=true;
}}
}}
if(found!==undefined){if(!inplace){
curLoop=result;}
expr=expr.replace(Expr.match[type],"");
if(!anyFound){return[];
-
7/31/2019 Cam Discussions
64/135
-
7/31/2019 Cam Discussions
65/135
-
7/31/2019 Cam Discussions
66/135
-
7/31/2019 Cam Discussions
67/135
-
7/31/2019 Cam Discussions
68/135
-
7/31/2019 Cam Discussions
69/135
-
7/31/2019 Cam Discussions
70/135
-
7/31/2019 Cam Discussions
71/135
varnot=match[3];
for(varj=0,l=not.length;j
-
7/31/2019 Cam Discussions
72/135
-
7/31/2019 Cam Discussions
73/135
-
7/31/2019 Cam Discussions
74/135
-
7/31/2019 Cam Discussions
75/135
-
7/31/2019 Cam Discussions
76/135
for(vari=0;elems[i];i++){elem=elems[i];
//GetthetextfromtextnodesandCDATAnodesif(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
//Traverseeverythingelse,exceptcommentnodes}elseif(elem.nodeType!==8){
ret+=Sizzle.getText(elem.childNodes);}
}
returnret;};
//Checktoseeifthebrowserreturnselementsbynamewhen//queryingbygetElementById(andprovideaworkaround)(function(){
//We'regoingtoinjectafakeinputelementwithaspecifiednamevarform=document.createElement("div"),
id="script"+(newDate()).getTime(),root=document.documentElement;
form.innerHTML="";
//Injectitintotherootelement,checkitsstatus,andremoveitquickly
root.insertBefore(form,root.firstChild);
//TheworkaroundhastodoadditionalchecksafteragetElementById//Whichslowsthingsdownforotherbrowsers(hencethebranching)if(document.getElementById(id)){
Expr.find.ID=function(match,context,isXML){if(typeofcontext.getElementById!=="undefined"&&!i
sXML){varm=context.getElementById(match[1]);
returnm?m.id===match[1]||typeofm.getAttribu
teNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:
[];}
};
Expr.filter.ID=function(elem,match){varnode=typeofelem.getAttributeNode!=="undefined"
&&elem.getAttributeNode("id");
returnelem.nodeType===1&&node&&node.nodeValue===match;
};}
root.removeChild(form);
//releasememoryinIEroot=form=null;
-
7/31/2019 Cam Discussions
77/135
})();
(function(){//Checktoseeifthebrowserreturnsonlyelements//whendoinggetElementsByTagName("*")
//Createafakeelementvardiv=document.createElement("div");div.appendChild(document.createComment(""));
//Makesurenocommentsarefoundif(div.getElementsByTagName("*").length>0){
Expr.find.TAG=function(match,context){varresults=context.getElementsByTagName(match[1]);
//Filteroutpossiblecommentsif(match[1]==="*"){
vartmp=[];
for(vari=0;results[i];i++){if(results[i].nodeType===1){
tmp.push(results[i]);}
}
results=tmp;}
returnresults;};
}
//Checktoseeifanattributereturnsnormalizedhrefattributesdiv.innerHTML="";
if(div.firstChild&&typeofdiv.firstChild.getAttribute!=="undefined"&&
div.firstChild.getAttribute("href")!=="#"){
Expr.attrHandle.href=function(elem){returnelem.getAttribute("href",2);
};}
//releasememoryinIEdiv=null;
})();
if(document.querySelectorAll){(function(){
varoldSizzle=Sizzle,div=document.createElement("div"),id="__sizzle__";
div.innerHTML="
";//Safarican'thandleuppercaseorunicodecharacterswhen//inquirksmode.if(div.querySelectorAll&&div.querySelectorAll(".TEST").lengt
h===0){
-
7/31/2019 Cam Discussions
78/135
return;}
Sizzle=function(query,context,extra,seed){context=context||document;
//Makesurethatattributeselectorsarequotedquery=query.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']")
;
//OnlyusequerySelectorAllonnon-XMLdocuments//(IDselectorsdon'tworkinnon-HTMLdocuments)if(!seed&&!Sizzle.isXML(context)){
if(context.nodeType===9){try{
returnmakeArray(context.querySelectorAll(query),extra);
}catch(qsaError){}
//qSAworksstrangelyonElement-rootedqueries//Wecanworkaroundthisbyspecifyinganextr
aIDontheroot//andworkingupfromthere(ThankstoAndrewD
upontforthetechnique)
//IE8doesn'tworkonobjectelements}elseif(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){
varold=context.getAttribute("id"),nid=old||id;
if(!old){context.setAttribute("id",nid
);}
try{returnmakeArray(context.queryS
electorAll("#"+nid+""+query),extra);
}catch(pseudoError){}finally{
if(!old){context.removeAttribute(
"id");}
}}
}
returnoldSizzle(query,context,extra,seed);
};
for(varpropinoldSizzle){Sizzle[prop]=oldSizzle[prop];
}
//releasememoryinIEdiv=null;
})();}
-
7/31/2019 Cam Discussions
79/135
-
7/31/2019 Cam Discussions
80/135
}};
//releasememoryinIEdiv=null;
})();
functiondirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(vari=0,l=checkSet.length;i
-
7/31/2019 Cam Discussions
81/135
-
7/31/2019 Cam Discussions
82/135
-
7/31/2019 Cam Discussions
83/135
-
7/31/2019 Cam Discussions
84/135
-
7/31/2019 Cam Discussions
85/135
-
7/31/2019 Cam Discussions
86/135
-
7/31/2019 Cam Discussions
87/135
-
7/31/2019 Cam Discussions
88/135
wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;
//IEcan'tserializeandtagsnormallyif(!jQuery.support.htmlSerialize){
wrapMap._default=[1,"div",""];}
jQuery.fn.extend({text:function(text){
if(jQuery.isFunction(text)){returnthis.each(function(i){
varself=jQuery(this);
self.text(text.call(this,i,self.text()));});
}
if(typeoftext!=="object"&&text!==undefined){returnthis.empty().append((this[0]&&this[0].ownerDoc
ument||document).createTextNode(text));
}
returnjQuery.text(this);},
wrapAll:function(html){if(jQuery.isFunction(html)){
returnthis.each(function(i){jQuery(this).wrapAll(html.call(this,i));
});}
if(this[0]){
//Theelementstowrapthetargetaroundvarwrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);
if(this[0].parentNode){wrap.insertBefore(this[0]);
}
wrap.map(function(){varelem=this;
while(elem.firstChild&&elem.firstChild.nodeType===1){
elem=elem.firstChild;}
returnelem;}).append(this);
}
returnthis;},
-
7/31/2019 Cam Discussions
89/135
-
7/31/2019 Cam Discussions
90/135
-
7/31/2019 Cam Discussions
91/135
-
7/31/2019 Cam Discussions
92/135
for(vari=0,l=this.length;i
-
7/31/2019 Cam Discussions
93/135
-
7/31/2019 Cam Discussions
94/135
-
7/31/2019 Cam Discussions
95/135
-
7/31/2019 Cam Discussions
96/135
-
7/31/2019 Cam Discussions
97/135
-
7/31/2019 Cam Discussions
98/135
-
7/31/2019 Cam Discussions
99/135
varralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,
cssShow={position:"absolute",visibility:"hidden",display:"block"},
cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],curCSS,
getComputedStyle,currentStyle,
fcamelCase=function(all,letter){returnletter.toUpperCase();
};
jQuery.fn.css=function(name,value){
//Setting'undefined'isano-opif(arguments.length===2&&value===undefined){returnthis;
}
returnjQuery.access(this,name,value,true,function(elem,name,value){
returnvalue!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);
});};
jQuery.extend({//Addinstylepropertyhooksforoverridingthedefault//behaviorofgettingandsettingastylepropertycssHooks:{
opacity:{get:function(elem,computed){
if(computed){//Weshouldalwaysgetanumberbackfr
omopacityvarret=curCSS(elem,"opacity","opac
ity");returnret===""?"1":ret;
}else{returnelem.style.opacity;
}}
}},
//ExcludethefollowingcsspropertiestoaddpxcssNumber:{
"zIndex":true,
-
7/31/2019 Cam Discussions
100/135
-
7/31/2019 Cam Discussions
101/135
-
7/31/2019 Cam Discussions
102/135
-
7/31/2019 Cam Discussions
103/135
-
7/31/2019 Cam Discussions
104/135
-
7/31/2019 Cam Discussions
105/135
-
7/31/2019 Cam Discussions
106/135
-
7/31/2019 Cam Discussions
107/135
-
7/31/2019 Cam Discussions
108/135
type:"POST",url:url,data:data,success:callback,dataType:type
});},
ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);
},
ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,/*timeout:0,data:null,username:null,password:null,
traditional:false,*///ThisfunctioncanbeoverridenbycallingjQuery.ajaxSetupxhr:function(){
returnnewwindow.XMLHttpRequest();},accepts:{
xml:"application/xml,text/xml",html:"text/html",script:"text/javascript,application/javascript",json:"application/json,text/javascript",text:"text/plain",
_default:"*/*"
}},
ajax:function(origSettings){vars=jQuery.extend(true,{},jQuery.ajaxSettings,origSetting
s),jsonp,status,data,type=s.type.toUpperCase(),noCont
ent=rnoContent.test(type);
s.url=s.url.replace(rhash,"");
//Useoriginal(notextended)contextobjectifitwasprovideds.context=origSettings&&origSettings.context!=null?origS
ettings.context:s;
//convertdataifnotalreadyastringif(s.data&&s.processData&&typeofs.data!=="string"){
s.data=jQuery.param(s.data,s.traditional);}
//HandleJSONPParameterCallbacksif(s.dataType==="jsonp"){
if(type==="GET"){
-
7/31/2019 Cam Discussions
109/135
-
7/31/2019 Cam Discussions
110/135
-
7/31/2019 Cam Discussions
111/135
-
7/31/2019 Cam Discussions
112/135
-
7/31/2019 Cam Discussions
113/135
-
7/31/2019 Cam Discussions
114/135
xhr.abort=function(){if(xhr){
//oldAborthasnocallpropertyinIE7so
//justdoitthisway,whichworksinall
//browsersFunction.prototype.call.call(oldAbort,
xhr);}
onreadystatechange("abort");};
}catch(abortError){}
//Timeoutcheckerif(s.async&&s.timeout>0){
setTimeout(function(){//Checktoseeiftherequestisstillhappenin
gif(xhr&&!requestDone){
onreadystatechange("timeout");}
},s.timeout);
}
//Sendthedatatry{
xhr.send(noContent||s.data==null?null:s.data);
}catch(sendError){jQuery.handleError(s,xhr,null,sendError);
//FirethecompletehandlersjQuery.handleComplete(s,xhr,status,data);
}
//firefox1.5doesn'tfirestatechangeforsyncrequestsif(!s.async){onreadystatechange();
}
//returnXMLHttpRequesttoallowabortingtherequestetc.returnxhr;
},
//Serializeanarrayofformelementsorasetof//key/valuesintoaquerystringparam:function(a,traditional){
vars=[],
add=function(key,value){//Ifvalueisafunction,invokeitandreturn
itsvaluevalue=jQuery.isFunction(value)?value():val
ue;s[s.length]=encodeURIComponent(key)+"="+
encodeURIComponent(value);};
//SettraditionaltotrueforjQuery
-
7/31/2019 Cam Discussions
115/135
-
7/31/2019 Cam Discussions
116/135
-
7/31/2019 Cam Discussions
117/135
-
7/31/2019 Cam Discussions
118/135
//Ifthetypeis"script",evalitinglobalcontext}elseif(type==="script"||!type&&ct.indexOf("ja
vascript")>=0){jQuery.globalEval(data);
}}
returndata;}
});
/**Createtherequestobject;Microsoftfailedtoproperly*implementtheXMLHttpRequestinIE7(can'trequestlocalfiles),*soweusetheActiveXObjectwhenitisavailable*AdditionallyXMLHttpRequestcanbedisabledinIE7/IE8so*weneedafallback.*/if(window.ActiveXObject){
jQuery.ajaxSettings.xhr=function(){if(window.location.protocol!=="file:"){
try{
returnnewwindow.XMLHttpRequest();}catch(xhrError){}}
try{returnnewwindow.ActiveXObject("Microsoft.XMLHTTP");
}catch(activeError){}};
}
//DoesthisbrowsersupportXHRrequests?jQuery.support.ajax=!!jQuery.ajaxSettings.xhr();
varelemdisplay={},rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=/^([+\-]=)?([\d+.\-]+)(.*)$/,timerId,fxAttrs=[
//heightanimations["height","marginTop","marginBottom","paddingTop","paddingB
ottom"],//widthanimations["width","marginLeft","marginRight","paddingLeft","paddingR
ight"],//opacityanimations["opacity"]
];
jQuery.fn.extend({show:function(speed,easing,callback){
varelem,display;
if(speed||speed===0){
-
7/31/2019 Cam Discussions
119/135
-
7/31/2019 Cam Discussions
120/135
//Setthedisplayoftheelementsinasecondloop//toavoidtheconstantreflowfor(i=0;i
-
7/31/2019 Cam Discussions
121/135
-
7/31/2019 Cam Discussions
122/135
-
7/31/2019 Cam Discussions
123/135
},
stop:function(clearQueue,gotoEnd){vartimers=jQuery.timers;
if(clearQueue){this.queue([]);
}
this.each(function(){//goinreverseordersoanythingaddedtothequeuedu
ringtheloopisignoredfor(vari=timers.length-1;i>=0;i--){
if(timers[i].elem===this){if(gotoEnd){
//forcethenextsteptobethelast
timers[i](true);}
timers.splice(i,1);}
}});
//startthenextinthequeueifthelaststepwasn'tforcedif(!gotoEnd){
this.dequeue();}
returnthis;}
});
functiongenFx(type,num){varobj={};
jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){
obj[this]=type;});
returnobj;}
//GenerateshortcutsforcustomanimationsjQuery.each({
slideDown:genFx("show",1),slideUp:genFx("hide",1),
slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}
},function(name,props){jQuery.fn[name]=function(speed,easing,callback){
returnthis.animate(props,speed,easing,callback);};
});
-
7/31/2019 Cam Discussions
124/135
-
7/31/2019 Cam Discussions
125/135
(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);},
//Getthecurrentsizecur:function(){
if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){
returnthis.elem[this.prop];}
varr=parseFloat(jQuery.css(this.elem,this.prop));returnr&&r>-10000?r:0;
},
//Startananimationfromonenumbertoanothercustom:function(from,to,unit){
varself=this,fx=jQuery.fx;
this.startTime=jQuery.now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";
this.now=this.start;this.pos=this.state=0;
functiont(gotoEnd){returnself.step(gotoEnd);
}
t.elem=this.elem;
if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(fx.tick,fx.interval);
}},
//Simple'show'functionshow:function(){
//Rememberwherewestarted,sothatwecangobacktoitlaterthis.options.orig[this.prop]=jQuery.style(this.elem,this.pro
p);this.options.show=true;
//Begintheanimation//Makesurethatwestartatasmallwidth/heighttoavoidany//flashofcontentthis.custom(this.prop==="width"||this.prop==="height"?1
:0,this.cur());
//StartbyshowingtheelementjQuery(this.elem).show();
},
//Simple'hide'functionhide:function(){
//Rememberwherewestarted,sothatwecangobacktoitlaterthis.options.orig[this.prop]=jQuery.style(this.elem,this.pro
p);
-
7/31/2019 Cam Discussions
126/135
this.options.hide=true;
//Begintheanimationthis.custom(this.cur(),0);
},
//Eachstepofananimationstep:function(gotoEnd){
vart=jQuery.now(),done=true;
if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();
this.options.curAnim[this.prop]=true;
for(variinthis.options.curAnim){if(this.options.curAnim[i]!==true){
done=false;}
}
if(done){
//Resettheoverflowif(this.options.overflow!=null&&!jQuery.support.shrinkWrapBlocks){
varelem=this.elem,options=this.options;
jQuery.each(["","X","Y"],function(index,value){
elem.style["overflow"+value]=options.overflow[index];
});}
//Hidetheelementifthe"hide"operationwasdoneif(this.options.hide){
jQuery(this.elem).hide();}
//Resettheproperties,iftheitemhasbeenhiddenorshown
if(this.options.hide||this.options.show){for(varpinthis.options.curAnim){
jQuery.style(this.elem,p,this.options.orig[p]);
}
}
//Executethecompletefunctionthis.options.complete.call(this.elem);
}
returnfalse;
}else{varn=t-this.startTime;
-
7/31/2019 Cam Discussions
127/135
-
7/31/2019 Cam Discussions
128/135
fx.elem[fx.prop]=fx.now;}
}}
});
if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.animated=function(elem){
returnjQuery.grep(jQuery.timers,function(fn){returnelem===fn.elem;
}).length;};
}
functiondefaultDisplay(nodeName){if(!elemdisplay[nodeName]){
varelem=jQuery("").appendTo("body"),display=elem.css("display");
elem.remove();
if(display==="none"||display===""){display="block";
}
elemdisplay[nodeName]=display;}
returnelemdisplay[nodeName];}
varrtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;
if("getBoundingClientRect"indocument.documentElement){jQuery.fn.offset=function(options){varelem=this[0],box;
if(options){returnthis.each(function(i){
jQuery.offset.setOffset(this,options,i);});
}
if(!elem||!elem.ownerDocument){returnnull;
}
if(elem===elem.ownerDocument.body){returnjQuery.offset.bodyOffset(elem);
}
try{box=elem.getBoundingClientRect();
}catch(e){}
vardoc=elem.ownerDocument,
-
7/31/2019 Cam Discussions
129/135
docElem=doc.documentElement;
//Makesurewe'renotdealingwithadisconnectedDOMnodeif(!box||!jQuery.contains(docElem,elem)){
returnbox||{top:0,left:0};}
varbody=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=(win.pageYOffset||jQuery.support.boxModel
&&docElem.scrollTop||body.scrollTop),scrollLeft=(win.pageXOffset||jQuery.support.boxModel
&&docElem.scrollLeft||body.scrollLeft),top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;
return{top:top,left:left};};
}else{jQuery.fn.offset=function(options){
varelem=this[0];
if(options){returnthis.each(function(i){
jQuery.offset.setOffset(this,options,i);});
}
if(!elem||!elem.ownerDocument){returnnull;
}
if(elem===elem.ownerDocument.body){returnjQuery.offset.bodyOffset(elem);
}
jQuery.offset.initialize();
varcomputedStyle,offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getCompute
dStyle(elem,null):elem.currentStyle,
top=elem.offsetTop,left=elem.offsetLeft;
while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){
if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){
break;}
-
7/31/2019 Cam Discussions
130/135
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;
top-=elem.scrollTop;left-=elem.scrollLeft;
if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;
if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){
top+=parseFloat(computedStyle.borderTopWidth)||0;
left+=parseFloat(computedStyle.borderLeftWidth)||0;
}
prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;
}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){
top+=parseFloat(computedStyle.borderTopWidth
)||0; left+=parseFloat(computedStyle.borderLeftWidth)||0;
}
prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){
top+=body.offsetTop;left+=body.offsetLeft;
}
if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){
top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);
}
return{top:top,left:left};};
}
jQuery.offset={initialize:function(){
varbody=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jQuery.css(body,"marginTop"))||0,
html="";
jQuery.extend(container.style,{position:"absolute",top:0,
-
7/31/2019 Cam Discussions
131/135
-
7/31/2019 Cam Discussions
132/135
-
7/31/2019 Cam Discussions
133/135
-
7/31/2019 Cam Discussions
134/135
-
7/31/2019 Cam Discussions
135/135
returnelem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||
elem.document.body["client"+name];
//Getdocumentwidthorheight}elseif(elem.nodeType===9){
//Eitherscroll[Width/Height]oroffset[Width/Height],whicheverisgreater
returnMath.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement
["scroll"+name],elem.body["offset"+name],elem.documentElement
["offset"+name]);
//Getorsetwidthorheightontheelement}elseif(size===undefined){
varorig=jQuery.css(elem,type),ret=parseFloat(orig);
returnjQuery.isNaN(ret)?orig:ret;
//Setthewidthorheightontheelement(defaulttopixelsif
valueisunitless)}else{returnthis.css(type,typeofsize==="string"?size:
size+"px");}
};
});
})(window);
top related