Assalamualaikum
Okay, now nak buat totorial 'Jquery back to top' for blogskins. Okay, tanpa membuang masa, mari kita mulakannya. Oh yeahh! Lulz.
1. Buka template korang.
2. And then, search code ni </head>
3. Dah jumpa? Code then copy code di bawah ni and paste kan di bawah </head> tu tadi.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script><script type='text/javascript' language='Javascript'>var scrolltotop={//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (1=top).setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 500]},controlHTML: '<img onmousedown="event.preventDefault ? event.preventDefault() : event.returnValue = false" src="URL IMAGE"/>', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ center of window corneranchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" linksstate: {isvisible:false, shouldvisible:false},scrollup:function(){if (!this.cssfixedsupport) //if control is positioned using JavaScriptthis.$control.css({opacity:0}) //hide control immediately after clicking itvar dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string existsdest=jQuery('#'+dest).offset().topelsedest=0this.$body.animate({scrollTop: dest}, this.setting.scrollduration);},keepfixed:function(){var $window=jQuery(window)var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetxvar controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsetythis.$control.css({left:controlx+'px', top:controly+'px'})},togglecontrol:function(){var scrolltop=jQuery(window).scrollTop()if (!this.cssfixedsupport)this.keepfixed()this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : falseif (this.state.shouldvisible && !this.state.isvisible){this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])this.state.isvisible=true}else if (this.state.shouldvisible==false && this.state.isvisible){this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])this.state.isvisible=false}},init:function(){jQuery(document).ready(function($){var mainobj=scrolltotopvar iebrws=document.allmainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards modemainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>').css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}).attr({title:'Fly To The Sky'}).click(function(){mainobj.scrollup(); return false}).appendTo('body')if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any textmainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing textmainobj.togglecontrol()$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){mainobj.scrollup()return false})$(window).bind('scroll resize', function(e){mainobj.togglecontrol()})})}}scrolltotop.init()</script>
Yang warna merah tu korang tukarkan kepada gambar apa yang korang nak letak.
Lepastu, jangan save dulu. Tekan preview dulu dan lihat hasilnya, jadi ke tidak. Kalau menjadi barulah boleh save. Done.
Itu sahaja. Assalamualaikum...
Lots of Love,
Erfa Nani
Labels: Tutorial
?
|
Given name, Norerfa Nani. Born on 10th May 1997. I'm a big fans of JUSTIN BIEBER. Forever a BELIEBERS ♥
orang skodeng
blog saya.
Ask me | Facebook
Leave your footprint here. Thank you.
Follow my Twitter:
Assalamualaikum
Okay, now nak buat totorial 'Jquery back to top' for blogskins. Okay, tanpa membuang masa, mari kita mulakannya. Oh yeahh! Lulz.
1. Buka template korang.
2. And then, search code ni </head>
3. Dah jumpa? Code then copy code di bawah ni and paste kan di bawah </head> tu tadi.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script><script type='text/javascript' language='Javascript'>var scrolltotop={//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (1=top).setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 500]},controlHTML: '<img onmousedown="event.preventDefault ? event.preventDefault() : event.returnValue = false" src="URL IMAGE"/>', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ center of window corneranchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" linksstate: {isvisible:false, shouldvisible:false},scrollup:function(){if (!this.cssfixedsupport) //if control is positioned using JavaScriptthis.$control.css({opacity:0}) //hide control immediately after clicking itvar dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string existsdest=jQuery('#'+dest).offset().topelsedest=0this.$body.animate({scrollTop: dest}, this.setting.scrollduration);},keepfixed:function(){var $window=jQuery(window)var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetxvar controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsetythis.$control.css({left:controlx+'px', top:controly+'px'})},togglecontrol:function(){var scrolltop=jQuery(window).scrollTop()if (!this.cssfixedsupport)this.keepfixed()this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : falseif (this.state.shouldvisible && !this.state.isvisible){this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])this.state.isvisible=true}else if (this.state.shouldvisible==false && this.state.isvisible){this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])this.state.isvisible=false}},init:function(){jQuery(document).ready(function($){var mainobj=scrolltotopvar iebrws=document.allmainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards modemainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>').css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}).attr({title:'Fly To The Sky'}).click(function(){mainobj.scrollup(); return false}).appendTo('body')if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any textmainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing textmainobj.togglecontrol()$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){mainobj.scrollup()return false})$(window).bind('scroll resize', function(e){mainobj.togglecontrol()})})}}scrolltotop.init()</script>
Yang warna merah tu korang tukarkan kepada gambar apa yang korang nak letak.
Lepastu, jangan save dulu. Tekan preview dulu dan lihat hasilnya, jadi ke tidak. Kalau menjadi barulah boleh save. Done.
Itu sahaja. Assalamualaikum...
Lots of Love,
Erfa Nani
Labels: Tutorial
About Le Boss...
Biography
My name is Norerfa Nani. Call me Efa for short. I'm sixteen will turn to 17 next year and yes next year I become a spm victim. Born on May, 10th 1997 at Hospital Pusrawi, Kajang. I love cats, a lot and I have 5 cats in my house (actually I have a lot of cats, more than 10 something but half of it dead and missing) My cat just born 4 kittens in September, 2013 yeah I'm so happy. Oh well I'm a beliebers (don't hate) Belieber since 2011. I love dressing-up, i love fashion that's why. I love shopping (I'm a girl ofcourse I love shopping) I have 5 siblings and I'm the youngest (the one and only girl in the siblings) I think I will stop here right now, will update it if I want to sooner or later idk haha chow
Blog Tutorials
TUTORIAL
Tutorial : Underline Hover
Tutorial : Type of border blockquote
Tutorial : Flash blockquote
Tutorial : Link hover
Tutorial : Header hover
Tutorial : Header Hover II
Tutorial : Body background
Tutorial : Buang border image
Tutorial : Cara ambil code lagu
Tutorial : Masukkan picture di post
Tutorial : Change highlight color
Tutorial : Disable right click without alert
Tutorial : Disable right click
Tutorial : tukar home,older and newer jadi icon/image
Tutorial : Cara Menggunakan Blogskins
Tutorial : Favicon *Blogskins
Tutorial : Dashboard & Follow Button *Blogskins
Tutorial : Youtube Player (Transparent) *Blogskins
Tutorial : Jquery Music Player *Blogskins
Tutorial : Facebook like page
Tutorial : Facebook share button
Tutorial : Facebook like button
Credits If You Copy My Work :) Thank you.
Freebies For You
FREEBIES
Freebies : Small icon yang comel
Freebies : Picture for your header
Freebies : Background Part 1
Freebies : Cursor Mustache
Credits If You Copy My Work :) Thank you.
|