featureimagezoomeratt

2
addimagezoom()functionoptions HTMLAttribute Default Description zoomrange undefined(noresizingofmagnifiedimage). Setsthezoomle velofthemagnifiedimagerelativetotheoriginalimage.Thevalueshouldbei ntheform[x,y],wherexandyareintegersthatdefinethelowerandupperbo undsofthezoomlevel.Forexample: [3,3]//setsthezoomlevelto3,withnoabilitytotogglethezoomlevel [2,10]//setstheinitialzoomlevelto2,withabilitytoincreaseupto10by usingthemousewheel. Thedefaultvalueforthisoptionisundefined,whichmeansthescriptwillsimp lydisplaythemagnifiedimageinitsoriginaldimensionswithnoresizing.The largeimageoptionbelowletsyoudefinethelargeimagethatshouldbeusedast hemagnifiedimage. magnifiersize [200,200] Setsthema gnifyingarea'sdimensionsinpixels. Defaultis[200,200],or200pxwideby200pxtall. magnifierpos "right" Setsthepositionofthe magnif yingarearelative tothe originalimage.Enter"right"or"left".Defaultis"right". largeimage undefined(originalimageusedasmagnifiedimage). Specifie sthefullpathorURLtothemagnifiedimage.Thisshouldbealarger,higherr esolutionversionoftheoriginalimage,forexample: $('#image1').addimagezoom({ zoomrange:[3,10], largeimage:'myimages/haydenlarge.jpg' }) Ifyouomitthezoomrangeoption,thelargeimagewillnotberesized(toapowe roftheoriginalimage).Youwoulddothiswhenthemagnifiedimageisalready atthemagnificationlevelyouwant: $('#image1').addimagezoom({ largeimage:'https://reader015.{domain}/reader015/html5/0505/5aedd68350aa9/5aedd684e90db.jpg }) NoticethatIleftoutthe"zoomrange"option,whichcausesthenaturaldimensio nsofthelargeimagetobeused,withnoresizing.Thedefaultvalueforlargei mageisundefined,whichcausesthescripttosimplyusetheoriginalimageast hemagnifiedimageaswell.Inthiscaseyou'llwanttomakesurezoomrangeisd efinedsothemagnifiedimageisenlargedinsomeway: $('#image1').addimagezoom({ zoomrange:[5,5] }) curshadev1.5 false Booleanthat when setto true showsa magni fying lenso ntop ofthe thum bnailimagewhilethemouseisoverit.Defaultisfalse. cursorshadecolorv1.5 "#fff" HTMLcolors tring thatsetsth ebackg round color ofthe magni fying lens. cursorshadeopacityv1.5 0.3 Decimalvaluethat sets thede greeof opaci tyof thelens,where1 isfu llyopaque(asifnoopacityisapplied),and0.1isalmosttransparent.

Upload: maheshvyas1605

Post on 06-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

 

addimagezoom()functionoptionsHTMLAttribute Default Descriptionzoomrange undefined(noresizingofmagnifiedimage). Setsthezoomlevelofthemagnifiedimagerelativetotheoriginalimage.Thevalueshouldbeintheform[x,y],wherexandyareintegersthatdefinethelowerandupperboundsofthezoomlevel.Forexample:[3,3]//setsthezoomlevelto3,withnoabilitytotogglethezoomlevel[2,10]//setstheinitialzoomlevelto2,withabilitytoincreaseupto10byusingthemousewheel.Thedefaultvalueforthisoptionisundefined,whichmeansthescriptwillsimplydisplaythemagnifiedimageinitsoriginaldimensionswithnoresizing.Thelargeimageoptionbelowletsyoudefinethelargeimagethatshouldbeusedasthemagnifiedimage.

magnifiersize [200,200] Setsthemagnifyingarea'sdimensionsinpixels.Defaultis[200,200],or200pxwideby200pxtall.magnifierpos "right" Setsthepositionofthemagnifyingarearelativetotheoriginalimage.Enter"right"or"left".Defaultis"right".largeimage undefined(originalimageusedasmagnifiedimage). SpecifiesthefullpathorURLtothemagnifiedimage.Thisshouldbealarger,higherresolutionversionoftheoriginalimage,forexample:$('#image1').addimagezoom({zoomrange:[3,10],largeimage:'myimages/haydenlarge.jpg'})

Ifyouomitthezoomrangeoption,thelargeimagewillnotberesized(toapoweroftheoriginalimage).Youwoulddothiswhenthemagnifiedimageisalreadyatthemagnificationlevelyouwant:

$('#image1').addimagezoom({largeimage:'https://reader015.{domain}/reader015/html5/0505/5aedd68350aa9/5aedd684e90db.jpg'})

NoticethatIleftoutthe"zoomrange"option,whichcausesthenaturaldimensionsofthelargeimagetobeused,withnoresizing.Thedefaultvalueforlargeimageisundefined,whichcausesthescripttosimplyusetheoriginalimageasthemagnifiedimageaswell.Inthiscaseyou'llwanttomakesurezoomrangeisdefinedsothemagnifiedimageisenlargedinsomeway:

$('#image1').addimagezoom({zoomrange:[5,5]})

curshadev1.5

false Booleanthatwhensettotrueshowsamagnifyinglensontopofthethumbnailimagewhilethemouseisoverit.Defaultisfalse.cursorshadecolorv1.5

"#fff" HTMLcolorstringthatsetsthebackgroundcolorofthemagnifyinglens.cursorshadeopacityv1.5

0.3 Decimalvaluethatsetsthedegreeofopacityofthelens,where1isfullyopaque(asifnoopacityisapplied),and0.1isalmosttransparent.

 

cursorshadeborderv1.5 "1pxsolidblack" CSSstringvaluethatsetsthestyleoftheborderofthelens.