Blog Tutorial - Add Nudging Effect To Links And Image
1. Go to your Bloggerg.
2. Go to Dashoard.
3. Edit Html.
4. Tick The "Expand Widget Template".
5. Find this code on your template: ]]></b:skin> and add the following code above it.
.link-nudge {-moz-transition:all 0.4s ease-out; -o-transition:all 0.4s ease-out; -webkit-transition:all 0.4s ease-out; -ms-transition:all 0.4s ease-out; transition:all 0.4s ease-out;}
.link-nudge:hover {margin-left:5px; padding-left:5px;}
You can change both values, "5px" for margin and "5px" for padding. Just set it to fit the place.
6. Save your template.
7. Now anytime you'd like to add nudging effect to a custom image or link (a single image or link), you can simply add a "class" function to that image or link and it will call the effect. Here is an example:
Add nudging effect to a single image: <img src="img url" class="link-nudge"/>
Add nudging effect to a single link: <a href="Link url" class="link-nudge">Your Anchor</a>
The above is adding nudging effect to a single image or link, now you'd like to add the effect to every links and labels on your blog, as such you need to add the following script to your template code. The Script code above looks like the below.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function() {$(&a.nudge, .#Label1 ul li a&).hover(function() { //mouse in
$(this).animate({marginLeft: &5px& }, 400);}, function() { //mouse out
$(this).animate({marginLeft: 0 }, 400);
});
});
</script>
That's all guys.
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.