Advertisement
nicole_c

Ezra Koenig tumblr theme

Sep 29th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.65 KB | None | 0 0
  1. <!--siosthemes'Cursors-->
  2. <style type="text/css">
  3. body, a {cursor: url('http://oi50.tinypic.com/122dxyb.jpg'), auto;}
  4. a:hover {cursor: url('http://i.imgur.com/IepP2.jpg'), auto;}
  5. </style>
  6. <!--siosthemes'Cursors-->
  7.  
  8. <html>
  9. <head>
  10.  
  11.  
  12. <style>
  13. #hellobeaut {
  14. text-align: center;
  15. font-size: 10px;
  16. position:fixed;
  17. left:106px;
  18. top:-99px;
  19. -webkit-transition: all .5s ease-in-out;
  20. -moz-transition: all .5s ease-in-out;
  21. -o-transition: all .5s ease-in-out;
  22. z-index:999;
  23. }
  24. #hellobeaut:hover {top:0px;}
  25. #hibeaut {
  26. border-right-style: ;
  27. border-bottom-style: ;
  28. border-left-style: ;
  29. border-width:1px;
  30. border-color:#000;
  31. padding: 5px 0 5px 0;
  32. background: #fff;
  33. width:200px;
  34. height:92px;
  35. border-bottom-right-radius: 5px;
  36. -moz-border-radius-bottomright: 5px;
  37. -webkit-border-bottom-right-radius: 5px;
  38. z-index: 9999;
  39. }
  40. #yoyoyofam{
  41. border-top-style:none;
  42. border-right-style: ;
  43. border-bottom-style: ;
  44. border-left-style: ;
  45. border-width:1px;
  46. border-color:#000;
  47. text-align: center;
  48. height:9px;
  49. font-size:18px;
  50. padding: 2px 0 8px 0;
  51. background:#fff;
  52. border-bottom-left-radius: 5px;
  53. -moz-border-radius-bottomleft: 5px;
  54. -webkit-border-bottom-left-radius: 5px;
  55. border-bottom-right-radius: 5px;
  56. -moz-border-radius-bottomright: 5px;
  57. -webkit-border-bottom-right-radius: 5px;
  58. width: 30px;
  59. }
  60. </style>
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. <!--tiberiuscrassus' first theme ever and probably the last too-->
  79.  
  80. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  81. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  82. <head><title>{Title}</title>
  83. <link rel="shortcut icon" href="{Favicon}">
  84. <link rel="alternate" type="application/rss+xml" href="{RSS}">
  85. {block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description}
  86. <link href='http://fonts.googleapis.com/css?family=Port+Lligat+Slab' rel='stylesheet' type='text/css'>
  87.  
  88. <!--Default Variables-->
  89. <!--Colors-->
  90.  
  91. <meta name="color:Background" content="#ffffff"/>
  92. <meta name="color:Text" content="#333333"/>
  93. <meta name="color:Link" content="#717581"/>
  94. <meta name="color:Hover" content="#333333"/>
  95. <meta name="color:Border" content="#969696"/>
  96. <meta name="color:scrollbar" content="#969696"/>
  97. <meta name="color:scrollbg" content="#fff"/>
  98.  
  99. <!--Images-->
  100.  
  101. <meta name="image:Sidebar" content=""/>
  102. <meta name="image:background" content=""/>
  103.  
  104. <!--Links-->
  105.  
  106. <meta name="text:Link1" content="/" />
  107. <meta name="text:Link1 Title" content="" />
  108. <meta name="text:Link2" content="/" />
  109. <meta name="text:Link2 Title" content="" />
  110.  
  111. <style type="text/css">
  112.  
  113.  
  114. ::selection {
  115. background: #d8c197;
  116. color: #ffffff;
  117. }
  118. ::-moz-selection {
  119. background: #d8c197;
  120. color: #ffffff;
  121. }
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. #dhtmltooltip{ position: absolute; max-width: 300px; border: 0px solid #000000; padding: 3px; background-color: white; color: #000000; visibility: hidden; z-index: 100; font-family:arial; /* change the font */
  134.  
  135. font-size:9px; /* change the font size */
  136.  
  137.  
  138. letter-spacing:1px; /* change the letter spacing */
  139.  
  140.  
  141. /*Remove below line to remove shadow. Below line should always appear last within this CSS*/ filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=50); }
  142.  
  143.  
  144.  
  145. ::-webkit-scrollbar {height: auto;width: 6px;}
  146. ::-webkit-scrollbar-thumb {background-color:{color:scrollbar};}
  147. ::-webkit-scrollbar-track{background-color:{color:scrollbg};}
  148.  
  149. body {
  150. background:{color:background};
  151. background-image: url('{image:background}')
  152. background-repeat:repeat;
  153. background-attachment:fixed;
  154. background-position:left top;
  155. margin:0px;
  156. color:{color:text};
  157. font-family:calibri;
  158. font-size:11px;
  159. line-height:100%;
  160. }
  161.  
  162.  
  163.  
  164.  
  165. #tumblr_controls{position:fixed !important;-webkit-filter: invert(100%);-webkit-filter: grayscale(100%);opacity:0.5;}
  166.  
  167.  
  168. a {
  169. text-decoration:none;
  170. outline:none;
  171. -moz-outline-style:none;
  172. color:{color:link};
  173. -webkit-transition: all 0.5s ease;
  174. -moz-transition: all 0.5s ease;
  175. -o-transition: all 0.5s ease
  176. }
  177.  
  178. img {
  179. border:none;
  180. }
  181.  
  182. blockquote blockquote {
  183. padding-left:5px;
  184. border-left:1px solid;
  185. }
  186.  
  187. h1 {
  188. font-size:12px;
  189. font-family:calibri;
  190. text-transform:uppercase;
  191. }
  192.  
  193. a:hover {
  194. opacity:10;
  195. color:{color:hover};
  196. -webkit-transition: all 0.7s ease;
  197. -moz-transition: all 0.7s ease;
  198. -o-transition: all 0.7s ease
  199. }
  200.  
  201. small{
  202. font-size:9px;
  203. line-height:110%
  204. }
  205.  
  206. big {
  207. font-size:12px;
  208. line-height:110%
  209. }
  210.  
  211. b, strong{
  212. color:{color:text}
  213. }
  214. i, em {
  215. color:{color:text}
  216. }
  217. p{
  218. margin-top:5px;
  219. margin-bottom:5px
  220. }
  221. blockquote {
  222. padding:0px;
  223. padding-left:5px;
  224. margin:5px;
  225. border-left:1px dotted {color:text}
  226. }
  227.  
  228. blockquote img {
  229. max-width:300px
  230. }
  231.  
  232. ul, li img {
  233. max-with:250px
  234. }
  235.  
  236. .audio {
  237. width:500px;
  238. padding-bottom:10px;
  239. background-color:{color:infobg};
  240. }
  241.  
  242. .albumart {
  243. float:left;
  244. padding:0px 10px 10px 0px;
  245. }
  246.  
  247. .albumart img {
  248. width:45px;
  249. height:45px;
  250. }
  251.  
  252. .playercontainer {
  253. text-align:left;
  254. padding:10px;
  255. background-color:#ffffff;
  256. width:480px;
  257. }
  258.  
  259. .audioinfo {
  260. padding:10px;
  261. color:{color:text};
  262. }
  263.  
  264. #entries {
  265. padding:10px;
  266. width:500px;
  267. margin-left:500px;
  268. margin-top:85px;
  269. }
  270.  
  271.  
  272. #post {
  273. width:500px;
  274. padding-bottom:3px;
  275. opacity:1;
  276. padding-top:53px;
  277. margin-top:-35px;
  278. }
  279.  
  280. #sidebar {
  281. width:100px;
  282. position:fixed;
  283. margin-left:100px;
  284. margin-top:-90px;
  285. opacity:1;
  286. }
  287.  
  288. #sidebarimage img{
  289. width:570px;
  290. height:800px;
  291. position:fixed;
  292. margin-left:-150px;
  293. margin-top:10px;
  294. -webkit-transition: all 0.5s ease;
  295. -moz-transition: all 0.5s ease;
  296. -o-transition: all 0.5s ease
  297. }
  298.  
  299. #links {
  300. width:200px;
  301. font-family:cambria;
  302. font-size: 10px;
  303. padding:2px;
  304. margin-top:200px;
  305. word-spacing:2px;
  306. position:fixed;
  307. width:300px;
  308. color:{color:text};
  309. margin-top:319px;
  310. margin-left:-15px;
  311. text-align:center;
  312. padding:6px;
  313. background:#fff;
  314. }
  315.  
  316.  
  317. #links a{
  318. font-style:bold;
  319. color:{color:link};
  320. opacity:1;
  321. background-color:#fff;
  322. padding:2px;
  323. -webkit-transition: all 0.6s ease;
  324. -moz-transition: all 0.6s ease;
  325. -o-transition: all 0.6s ease;
  326. }
  327.  
  328. #links a:hover {
  329. color:#fff;
  330. opacity:1;
  331. background-color:{color:hover};
  332. padding:2px;
  333. -moz-transition-duration:0.5s;
  334. -webkit-transition-duration:0.5s;
  335. -o-transition-duration:0.5s;
  336. }
  337.  
  338. #description {
  339. font-family:calibri;
  340. font-size: 10px;
  341. position:fixed;
  342. width:245px;
  343. letter-spacing:1px;
  344. color:{color:text};
  345. margin-top:275px;
  346. margin-left:83px;
  347. text-align:center;
  348. padding:6px;
  349. background:#fff;
  350. transform: rotate(-6deg);
  351. -ms-transform: rotate(-6deg);
  352. -webkit-transform: rotate(-6deg);
  353. -o-transform: rotate(-6deg);
  354. -moz-transform: rotate(-6deg);
  355.  
  356.  
  357. }
  358.  
  359. #info {
  360. font-family:calibri;
  361. text-align:right;
  362. text-transform:uppercase;
  363. padding:5px;
  364. margin-top:5px;
  365. margin-bottom:0px;
  366. font-size:8px;
  367. }
  368.  
  369. #tags {
  370. font-family:times new roman;
  371. letter-spacing:1px;
  372. font-size: 8px;
  373. text-transform:lowercase;
  374. margin-top:-1px;
  375. a {display:inline; background-color:{color:linkb};
  376. padding:-4px;
  377. text-align:left;
  378. -webkit-transition: all 0.6s ease-in-out;
  379. -moz-transition: all 0.6s ease-in-out;
  380. -o-transition: all 0.6s ease-in-out;
  381. -ms-transition: all 0.6s ease-in-out;
  382. transition: all 0.6s ease-in-out;}
  383. }
  384.  
  385. #notes {
  386. font-family:calibri;
  387. text-transform:lowercase;
  388. font-size:9px;
  389. }
  390.  
  391. .ask {
  392. font:cambria;
  393. text-align:left;
  394. color:{color:text};
  395. background-color:{color:infobg};
  396. }
  397.  
  398. .ans {
  399. text-align:left;
  400. font:cambria;
  401. color:{color:text};
  402. }
  403.  
  404. #s-m-t-tooltip {
  405.  
  406. max-width:300px;
  407.  
  408. padding:1px 2px 1px 2px;
  409.  
  410. margin:20px 0px 0px 20px;
  411.  
  412. background-color: #000000;
  413.  
  414. color: #ffffff;
  415.  
  416.  
  417. border:1px solid #000000; /* change the border color */
  418.  
  419. font-family:arial; /* change the font */
  420.  
  421. font-size:7px; /* change the font size */
  422.  
  423. letter-spacing:1px; /* change the letter spacing */
  424.  
  425. text-transform:uppercase; /* can be uppercase, lowercase, none*/
  426.  
  427.  
  428.  
  429. z-index:999999999999999999999999999999999999;
  430.  
  431. }
  432.  
  433. {CustomCSS}</style></head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
  434.  
  435. <script src="http://static.tumblr.com/iuw14ew/VSQma1786/jquery.style-my-tooltips.js"></script>
  436.  
  437. <script>
  438.  
  439. (function($){
  440.  
  441. $(document).ready(function(){
  442.  
  443. $("a[title]").style_my_tooltips({
  444.  
  445. tip_follows_cursor:true,
  446.  
  447. tip_delay_time:90,
  448.  
  449. tip_fade_speed:600,
  450.  
  451. attribute:"title"
  452.  
  453. });
  454.  
  455. });
  456.  
  457. })(jQuery);
  458.  
  459. </script><body onkeydown="return false">
  460. <style> body, a, a:hover</style>
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. <div id="dhtmltooltip"></div>
  475.  
  476. <script type="text/javascript">
  477.  
  478. /***********************************************
  479. * Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
  480. * This notice MUST stay intact for legal use
  481. * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
  482. ***********************************************/
  483.  
  484. var offsetxpoint=10 //Customize x offset of tooltip
  485. var offsetypoint=20 //Customize y offset of tooltip
  486. var ie=document.all
  487. var ns6=document.getElementById && !document.all
  488. var enabletip=false
  489. if (ie||ns6)
  490. var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
  491.  
  492. function ietruebody(){
  493. return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
  494. }
  495.  
  496. function ddrivetip(thetext, thecolor, thewidth){
  497. if (ns6||ie){
  498. if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
  499. if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
  500. tipobj.innerHTML=thetext
  501. enabletip=true
  502. return false
  503. }
  504. }
  505.  
  506. function positiontip(e){
  507. if (enabletip){
  508. var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
  509. var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
  510. //Find out how close the mouse is to the corner of the window
  511. var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
  512. var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
  513.  
  514. var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
  515.  
  516. //if the horizontal distance isn't enough to accomodate the width of the context menu
  517. if (rightedge<tipobj.offsetWidth)
  518. //move the horizontal position of the menu to the left by it's width
  519. tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
  520. else if (curX<leftedge)
  521. tipobj.style.left="5px"
  522. else
  523. //position the horizontal position of the menu where the mouse is positioned
  524. tipobj.style.left=curX+offsetxpoint+"px"
  525.  
  526. //same concept with the vertical position
  527. if (bottomedge<tipobj.offsetHeight)
  528. tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
  529. else
  530. tipobj.style.top=curY+offsetypoint+"px"
  531. tipobj.style.visibility="visible"
  532. }
  533. }
  534.  
  535. function hideddrivetip(){
  536. if (ns6||ie){
  537. enabletip=false
  538. tipobj.style.visibility="hidden"
  539. tipobj.style.left="-1000px"
  540. tipobj.style.backgroundColor=''
  541. tipobj.style.width=''
  542. }
  543. }
  544.  
  545. document.onmousemove=positiontip
  546.  
  547. </script>
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576. <div id="sidebar">
  577. <div id="sidebarimage"><img src="{image:sidebar}"></div>
  578.  
  579.  
  580.  
  581. </div>
  582.  
  583. <div id="description">{Description}</div></div>
  584.  
  585.  
  586.  
  587.  
  588. <a href="/" onMouseover="ddrivetip('HOME')";
  589. onMouseout="hideddrivetip()"><img src="http://oi40.tinypic.com/30v12xc.jpg" width="85px" style="position: fixed; top: 110px; left: 1132px;"/></a>
  590.  
  591. <a href="/ask" onMouseover="ddrivetip('MESSAGE')"; onMouseout="hideddrivetip()"><img src="http://oi40.tinypic.com/16771wl.jpg" width="100px" style="position: fixed; top: 190px; left: 1127px;"/>
  592.  
  593. <a href="/"onMouseover="ddrivetip('LINK 1')"; onMouseout="hideddrivetip()"><img src="http://oi41.tinypic.com/20fey49.jpg" width="83px" style="position: fixed; top: 300px; left: 1135px;"/>
  594.  
  595. <a href="/"onMouseover="ddrivetip('LINK 2')"; onMouseout="hideddrivetip()"><img src="http://oi41.tinypic.com/rmjs0m.jpg" width="100px" style="position: fixed; top:390px; left: 1127px;"/>
  596.  
  597. <a href="/"onMouseover="ddrivetip('LINK 3')"; onMouseout="hideddrivetip()"><img src="http://oi42.tinypic.com/qrbrjs.jpg" width="100px" style="position: fixed; top:490px; left: 1127px;"/>
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619. <div id="entries">{block:Posts}<div id="post">
  620.  
  621. {block:Text}<h1>{block:Title}{Title}{/block:Title}</h1>{Body}{/block:Text}
  622.  
  623. {block:Photo}{LinkOpenTag}<img src="{PhotoURL-500}">{LinkCloseTag}{block:Caption}{Caption}{/block:Caption}{/block:Photo}
  624.  
  625. {block:Photoset}{Photoset-500}{block:Caption}{Caption}{/block:Caption}{/block:Photoset}
  626.  
  627. {block:Quote}{Quote}{block:Source} —{Source}{/block:Source}{/block:Quote}
  628.  
  629. {block:Link}<h1><a href="{URL}" {Target}>{Name}</a></h1>{block:Description}{Description}{/block:Description}{/block:Link}
  630.  
  631. {block:Video}{Video}{Video-500}<BR>{Caption}{block:Video}
  632.  
  633. {block:Chat}{block:Title}<h1>{Title}</h1>{/block:Title}{block:Lines}{block:Label}<b>{Label}</b>{/block:Label} {Line}<br>{/block:Lines}{/block:Chat}
  634.  
  635. {block:Audio}<div class="audio">{block:AlbumArt}<div class="albumart"><img src="{AlbumArtURL}"/></div>{/block:AlbumArt}
  636. {AudioPlayerWhite}{block:Caption}{Caption}{/block:Caption}{/block:Audio}
  637.  
  638. {block:Answer}<div class="ask"><img src="{AskerPortraitURL-24}"/> <div style="margin-top:-26px;margin-left:26px; background-color:#fbfbfb; padding:7px;"><b>{Asker}</b> <b>shouted</b>: {Question}</div></div><div class="ans"><blockquote>{Answer}</blockquote></div>{/block:answer}
  639.  
  640. <div id="info"><a href="{Perimalink}">{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date} with {NoteCountWithLabel} {block:RebloggedFrom} — <a href="{ReblogParentURL}">via</a> {/block:RebloggedFrom}
  641. {block:ContentSource} › <a href="{SourceURL}">source</a>{/block:ContentSource}{/block:RebloggedFrom}
  642. <div id="tags" st>
  643. {block:HasTags}<div id="tags">{block:Tags} -<a href="{TagURL}"><u>{Tag}</u></a> {/block:Tags}</div>{/block:HasTags}</div></div>
  644.  
  645. {/block:Posts}
  646.  
  647. <center>{block:Pagination}{block:PreviousPage}<a href="{PreviousPage}">← prev</a>{/block:PreviousPage}{/block:Pagination} {block:Pagination}{block:NextPage}<a href="{NextPage}">next →</a>{/block:NextPage}{/block:Pagination}{/block:Pagination}
  648.  
  649. {block:PostNotes}<div id="notes">{PostNotes}</div>{/block:PostNotes}
  650. {/block:Posts}</div></div></div></div>
  651. <div style="font-size: 12px; float: right; position: fixed; bottom: 15px; right: 15px; text-transform:lowercase;"><a href="http://siosthemes.tumblr.com"><b>₪</b></a></div>
  652.  
  653.  
  654.  
  655.  
  656. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  657. <script type="text/javascript">//** jQuery Scroll to Top Control script- (c) I made this script myself (Kyle Monk) and it is hosted on my personal site so would appreciate if you followed my blog at kylemonk.tumblr.com if you use it or for details on how to change the location.
  658. //** Graphic originally from tumbler dashboard, for details on how to change graphic colour, contact me at kylemonk.tumblr.com
  659. //** v1.1 (April 7th, 10'):
  660. //** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead.
  661. //** 2) Fixes scroll animation not working in Opera.
  662.  
  663.  
  664. var scrolltotop={
  665. //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
  666. //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
  667. setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},
  668. controlHTML: '<img src="http://media.tumblr.com/tumblr_lw6754XlLF1r43b17.png" style="filter:alpha(opacity=70); -moz-opacity:0.7; margin-bottom:-10px;" width=""/>', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"
  669. controlattrs: {offsetx:35, offsety:60}, //offset of control relative to right/ bottom of window corner
  670. anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links
  671.  
  672. state: {isvisible:false, shouldvisible:false},
  673.  
  674. scrollup:function(){
  675. if (!this.cssfixedsupport) //if control is positioned using JavaScript
  676. this.$control.css({opacity:0}) //hide control immediately after clicking it
  677. var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
  678. if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
  679. dest=jQuery('#'+dest).offset().top
  680. else
  681. dest=0
  682. this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
  683. },
  684.  
  685. keepfixed:function(){
  686. var $window=jQuery(window)
  687. var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
  688. var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
  689. this.$control.css({left:controlx+'px', top:controly+'px'})
  690. },
  691.  
  692. togglecontrol:function(){
  693. var scrolltop=jQuery(window).scrollTop()
  694. if (!this.cssfixedsupport)
  695. this.keepfixed()
  696. this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
  697. if (this.state.shouldvisible && !this.state.isvisible){
  698. this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
  699. this.state.isvisible=true
  700. }
  701. else if (this.state.shouldvisible==false && this.state.isvisible){
  702. this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])
  703. this.state.isvisible=false
  704. }
  705. },
  706.  
  707. init:function(){
  708. jQuery(document).ready(function($){
  709. var mainobj=scrolltotop
  710. var iebrws=document.all
  711. mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
  712. mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
  713. mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
  714. .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
  715. .attr({title:'back to top'})
  716. .click(function(){mainobj.scrollup(); return false})
  717. .appendTo('body')
  718. if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
  719. mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
  720. mainobj.togglecontrol()
  721. $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
  722. mainobj.scrollup()
  723. return false
  724. })
  725. $(window).bind('scroll resize', function(e){
  726. mainobj.togglecontrol()
  727. })
  728. })
  729. }
  730. }
  731.  
  732. scrolltotop.init()</script>
  733.  
  734.  
  735. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement