Showing posts with label Scrollers. Show all posts
Showing posts with label Scrollers. Show all posts

August 27, 2014

Weebly Tricks #70 - Samsung Grid Loading Effects

0 comments Posted by Domz at 8/27/2014

Samsung Grid Loading Effects for Weebly



Perfect for image gallery sites, here comes a tutorial suited for you. Made by Mary Lou of Codrops is a recreation of Samsung loading grid effect which can be seen at Samsung Corporate Design Center. Upgrade the way you showcase your precious photos to next level using these effects. I guess the potential of your photos are not only on the image itself but it’s also the way you present them.







TUTORIAL

The idea is simple, we will use a JavaScript to first load our initial images. Ofcourse, these images appears with no effects and while you scroll down, the animation triggers. Images will first load its prominent color followed by the image itself. We will be using ColorFinder script for that function. Other JQueries are also used to help us create a semi perfect output. A descent hover effects has also been included. You can use images of different sizes for a better appearance.

This is rather an intermediate tutorial but I already edited the codes making it easy for beginners to follow. Just be reminded to read each instruction I wrote. You should read the whole article before starting anything.



FILES NEEDED
How to use these files? Click Here!

modernizr.custom.js
masonry.pkgd.min.js
imagesloaded.pkgd.min.js
classie.js
colorfinder-1.1.js
gridScrollFx.js
samgri.css



FOOTER CODE
Where to place these codes? Click Here!

<script src="http://mwtdatabase.weebly.com/files/theme/modernizr.custom.js"></script>
<script src="http://mwtdatabase.weebly.com/files/theme/masonry.pkgd.min.js"></script>
<script src="http://mwtdatabase.weebly.com/files/theme/imagesloaded.pkgd.min.js"></script>
<script src="http://mwtdatabase.weebly.com/files/theme/classie.js"></script>
<script src="http://mwtdatabase.weebly.com/files/theme/colorfinder-1.1.js"></script>
<script src="http://mwtdatabase.weebly.com/files/theme/gridScrollFx.js"></script>
<script>
new GridScrollFx( document.getElementById( 'grid' ), {
viewportFactor : 0.4
} );
</script>

Note:
Red text - Change with your website address.



HEADER CODE
Where to place these codes? Click Here!

<link rel="stylesheet" href="http://mwtdatabase.weebly.com/files/theme/samgri.css" type="text/css" />

Note:
Red text - Change with your website address.



BODY CODE
Where to place these codes? Click Here!

<section class="grid-wrap">
    <ul class="grid swipe-right" id="grid">
        <li class="title-box">
            <h2>Tutorials From <a href="http://www.myweeblytricks.com/">My Weebly Tricks</a></h2>
        </li>
        <li><a href="#"><img src="http://myweeblytricksdemo2.weebly.com/files/theme/sam1.jpeg" alt="img01"><h3>Insert Text Here</h3></a></li>
    </ul>
</section>

Notes:
Yellow text - The title for your photo collections. Please refer to the demo page.
# - The link for your photo when someone click it.
Green text - The link source of your photos.
Blue text - Title of your photo.

Of course you will be using more than one photo, so simply copy the code as a whole on BOLD FORMAT and paste it before the </ul>.



BIG REMINDERS!!!
Big reminders to avoid scratching your head.

1. Upload the images to your own template by going to Design > Edit CSS/HMTL > Add files. Or you may read "Managing Files in Weebly". Don't forget to publish it.

2. After uploading, refer the image source with your domain name, example http://myweeblytricksdemo2.weebly.com/files/theme/sam1.jpeg just like the code above.

3. Center your "embed code" element (body code) by simply clicking the HTML and choose the center icon.

4. The number of grids depends on your body width, the wider the more grid. You can easily adjust your body width using CSS, just post your request on the forum and I will help you.



CONCLUSION

I spent a couple of hours to understand and make it work on our Weebly Template. I did all the hardships and the only thing left for you is to edit the image source, its link and its title. It's time for your site to evolve.

The most important thing to remember is how to capture your visitors within seconds. These types of effects promote site engagement and lesser bounce rate.

Guys! We are already advancing here, and if you're behind, better read “10 Things that can Change the Way you Edit your Weebly Site".
Read More »

August 15, 2014

Author's Pick #4 - 10 Capsulated Tips That Can Change The Way You Edit Your Weebly Site

0 comments Posted by Domz at 8/15/2014

Capsulated tips for Weebly



There are so many widgets, CSS3 effects, JQuery plug ins and other add ons out there. Some are so good that we wish our site could have it too! Some seems complicated, in fact, its simple. We only need a formula, a simple knowledge, a tiny trick to make it work.




The 1 page article I was about to send you can change the way you design your Weebly Site.

This is so precious that I can only share to my FeedBurner Subscribers. No exemption.

Some people, (including me) spent hours even days figuring out how to make those effects working on Weebly Template. Some techies might already know it but they never share.

Here in My Weebly Tricks, I will share it for FREE. And I will send it to you personally that's why I need you to be my FeedBurner Subscriber. That's all I ask, just a minute from you.

Actually, to be clear, I didn't make the codes you've seen and you've used on our site, I just edit it. Generous people creates the code patiently, and most of the time, they do it for free. My Weebly Tricks can never stand without those free codes. It's then my responsibility to include the code author and code source for each tutorial.

On our part, we are challenged of the question "How will I insert those plug ins in my Weebly site?". I guess you already ask that yourself. Then we started testing it with the basic knowledge we know. Unfortunately, the one that we want most turns out to be a failure. Then we research, research, research and finally end up with our own site. I know the feeling of being "frustrated".

But sometimes, the solution itself knocks our door. What I mean is, we discover new things through a mistake or trial and error. That's why I am advicing you to be curoius trying out new things, don't be afraid of committing mistake. As the ape on the movie "Dawn of the Planet of Apes" say "scars makes you strong".

Finally, I discovered a formula, as in simple formula to manage your CSS3, HTML5, and JQuery plug-in working together to achieve your goal. This formula works most of the time. Now you can't say "Oh, Weebly is a crap! It doesn't support HTML5, CSS3, Jquery of some type and bla bla bla". Now you can make your slideshows, carousels and sliders working.

You don't have to code to learn this formula, In fact I can say it in few sentences but I want to take this moment to gain your help. It wont cost you a penny, just be my FeedBurner subscriber and I will send the info right on the email address you used.

I'm telling it again, this knowledge is so precious that you can't find it anywhere else. Such advantage for designers out there. And for basic web editors, you will need this info to understand our next awesome tutorials. To give you a sample of what we can do with these 10 tips I was about to give you, use Chrome and  visit this link: http://myweeblytricksdemo2.weebly.com. That is our homepage for our second demo site and it can't be done with simple knowledge alone.

So what are you waiting for, subscribe below and get that "10 Capsulated Tips That Can Change The Way You Edit Your Weebly Site" for FREE.

Read More »

June 7, 2014

Weebly Tricks #54 - FaceScroll Custom Scrollbar From Dynamic Drive

0 comments Posted by Domz at 6/07/2014

Add a custom Text Scrollbar to your Weebly Site.



FaceScroll is actually a simple container to handle long and overflowing text. Its goal is to maintain your site's height no matter how long your text would be. In addition, FaceScroll has a smooth scrolling effect with simple editable inline styling. Thanks to Dynamic Drive for this useful trick.








1. As usual, download the following files below by right clicking on it and choose "save link as".

facescroll.js
jquery.ui.touch-punch.min.js
facescroll.css

Upload it to your Weebly Template by going to Design > Edit CSS/HTML > Add new files > choose the files you've just downloaded. Save your template.

2. We need to insert the Javascript and CSS in to your page/ site's head. To do that, simply go to Pages > choose your preferred page title on the left > click the Advance Settings on the right > Scroll down and on the header code box, paste the following:

<link href="http://myweeblytricksdemo.weebly.com/files/theme/facescroll.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>

<script type="http://myweeblytricksdemo.weebly.com/files/theme/jquery.ui.touch-punch.min.js"></script>

<script type="text/javascript" src="http://myweeblytricksdemo.weebly.com/files/theme/facescroll.js">
/***********************************************
* FaceScroll custom scrollbar (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll();
$('#demo2').alternateScroll({ 'vertical-bar-class': 'styled-v-bar', 'hide-bars': false });
})
</script>

You simply need to change the red marked text with your own website address to pinpoint the files you've uploaded on step 1. After editing, click "save and edit" button.

3. Now for the HTML, drag one "embed code" element from your left and paste the following code:

<div id="demo1" style="width:300px; height:250px; padding:8px; background:lightyellow; border:1px solid gray; resize:both; overflow:scroll">
Plan for your niche and its title. It should be specific because the broader it gets, the harder for you to manage.  Not only that, people will find it difficult to search your site when they use search engines like Google. Choose topics you know you can handle and always integrate them with the latest issues on internet. For example if your topic is about cats, if possible you must have a cat. You can also consider talking about “most played cat games on mobile” or the latest inventions like robot cats. Do not just stick to home related topics. Do not start a blog immediately using a top level domain rather choose a free subdomain. But before you create a one, check your preferred top level domain first if it’s still available. Your subdomain name should be similar to what you will buy later. There are many website providers you can start your blogging career. Choose the best you know and the easiest way to manage if you’re really a newbie. Know what they offer, their specialties and of course their pricing. Create at least 5 articles and experiment with them. Learn how to adjust the body and side bar width for future widgets. Write down your categories and subcategories. Study the commenting system. Treat yourself as a guest and feel how your site looks like. Change theme if necessary. Remember there are things you should configure now which can't be modified once your site has visitors. Complete your design with easy navigation. Most importantly add pages like About Us, Contact Us and your Privacy Policy. If you think you’re ready, you can now buy your own domain. If you have problems on buying online perhaps my other article can help, just click here. Choose a short, easy to remember domain that is related to your niche. You can now start writing real articles about your niche.
</div>

The yellow text will be your text content so change it with your own. If you want to edit the styling of your FaceScroll simply change the values of those in green text. The styling is self explanatory though you can always go to the code source for more info about FaceScroll.

If you can't get it working specially the styling, make sure you don't have this code (whatever version) in your page header or your whole site header:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

Weebly automatically inserted the minified version of jquery in your template so don't duplicate it. Publish your site and tell me what you think.
Read More »

June 6, 2014

Weebly Tricks #53 - Sticky Content on Scroll

0 comments Posted by Domz at 6/06/2014

Sticky Content on Scroll in Weebly Site


For long pages, you might want to keep something on your page visible to the reader. Many sites have been using this technique to keep useful information sticky like sulit.com's contact number on its sidebar. Other bloggers use it to make ads sticky but it can disturb the reader so please use it the way it becomes helpful. It supports photos, paragraphs and even menus.








1. Download the following JS file by right clicking on it and choose “save link as”,

stickycontent.js

Then upload it to your Weebly template by going to Design > Edit CSS/HTML > Add new files > select the files you've just downloaded and save your template.

2. Time to insert the code in your site/page <head>. Please read “3 Ways in Editing Weebly’s <head>” so you know where will you put the code if you decided to insert this on a single page or on the whole site (for sidebar). Once you've decided, paste the following code on the header code box:

<style>
/* CSS for your HTML element. Do not edit. */
.wcustomhtml {
overflow-y: visible !important;
overflow-x: visible !important;
}
</style>
<style>
/* CSS for sample sticky content */
.mattblacktabs{
overflow: hidden;
width:300px;
height:300px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://myweeblytricksdemo.weebly.com/files/theme/stickycontent.js">
/***********************************************
* Sticky Content script (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>
<script>
//initialize sticky content:
jQuery(document).ready(function($){
  $('#samplemenu').stickyit({
gap: 5,
stickyclass: "docked"
})
})
</script>

Change the red mark text with your website address. The green text refers to the styling of your content. Since I used an image so I just have to define my photo dimensions. Save after.

3. Ready to insert our HTML content. Just go to the page preferred, drag an “embed code” element and paste my sample below:

<div id="samplemenu" class="mattblacktabs">
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiEs8LgaBTW8q7_UQG2hbUfeGJAYqrSnDKnHedvaRBjW4n-vgiiVG6_oW8H9E5eBu0MNVqF8NMFZ_V1ph2doYqfcH2psmQOJ9b5Jb55JZvONfn7yi8Tb7yj_yJPxxWHczEzXQjNz66O6J/s1600/Custom+Search+Engine+for+Weebly.png" />
</div>

The red marked text simply defines the image source I used. The size will be 300x300 as I specifically edited my CSS on step 2. You can always change it and use your own image. Publish your site and see the outcome.

You may also try the sample from Dynamic Drive which is "menu" instead of image. Just let me know if you need help.
Read More »

January 20, 2014

Weebly Tricks #20 - Add an Auto Text and Image Scroller in Weebly.

0 comments Posted by Domz at 1/20/2014

Text and image scroller in Weebly
Going back to our Weebly tricks, we will talk today about news website. So what are some useful effects we can use to a website focusing on news? I've got one here which they call "pausing up-down message scroller". The script came from my favorite source dynamicdrive.com. 

Ok so what does this thing do? Simply it can display 3 sentences ascending after one another. Images can be used too! Please check the demo for a clearer view. You can put here your personal ads and different headlines.







1. Ok so the original script has only two types of content, a short phrase and a long one that has a title. I inserted an option for image too in case you like it. Now, go to <head>, again, please read my article on how to edit the <head>. Once you found, just paste below it the following code:

<style type="text/css">

/*Example CSS for the two demo scrollers*/

#pscroller1{
width: 200px;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color: lightyellow;
}

#pscroller2{
width: 350px;
height: 20px;
border: 1px solid black;
padding: 3px;
}

#pscroller2 a{
text-decoration: none;
}

#pscroller3{
width: 200px;
height: 200px;
border: 1px solid black;
padding: 3px;
}

.someclass{ //class to apply to your scroller(s) if desired
}

</style>

<script type="text/javascript">

/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

var pausecontent2=new Array()
pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'

var pausecontent3=new Array()
pausecontent3[0]='<img src="http://theweeblytricks.weebly.com/files/theme/1.png">'
pausecontent3[1]='<img src="http://theweeblytricks.weebly.com/files/theme/2.png">'
pausecontent3[2]='<img src="http://theweeblytricks.weebly.com/files/theme/3.png">'

</script>

<script type="text/javascript">

/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

</script>

You can modify each box separated with tags #pscroller1,#pscroller2 and #pscroller3. The last one which is #pscroller3, thats the image part where in you make sure to follow the image dimension to fit in the box. For texts, you should also adjust their box sizes depending on how long your text will be.

The content of each box can be configured on lines starting with var pausecontent, var pausecontent2 and var pausecontent3 which corresponds to the modification of their boxes. They are numbered so you can identify which of them are partners. you can insert here your texts, links and images sources. After editing save it.

2. So assuming you're done, now you can  activate the effect on a page by simply dragging an "embed code" and paste the following:

<script type="text/javascript">

//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)

new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
document.write("<br />")
new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)
document.write("<br />")
new pausescroller(pausecontent3, "pscroller3", "someclass", 2000)
</script>

There are 4 elements required to show the real effect. Again they are numbered meaning they correspond to the number you input in your CSS in the <head>. The numerical represents the pausing of a sentence or image in milliseconds which is basically, the longer the text the longer the pausing. The code above gives you the 3 examples in the demo so if you need only 1 type just remove any of the short tags separated with the ("<br/>"). Remember pscroller1 for long paragraphs, pscroller2 for short sentences and pscroller3 for images.

3. Now publish your site to see the effects, you won't see it while editing. If you didn't come out with the same result I made, don't hesitate to ask questions.
Read More »
 

© 2014. All Rights Reserved | My Weebly Tricks | Template by Blogger Widgets

Home | | Privacy Policy | Top ▲