Adding and removing and toggle CSS classes is a effective method to highlight changes in web pages. jQuery provides different Attributes for .addClass(), .removeClass() and toggleClass methods.
addClass():
jQuery:
<script type=”text/javascript”>
$(document).ready(function(){
$(”p.list”).click(function(){
$(this).addClass(”active”);
});
});
</script>
The CSS:
<style type=”text/css”>
p{
float: left;
width: 33.3%;
padding: 0;
margin: 0;
}
.block {
margin-right: 10px;
padding: 20px;
background: #fff;
}
.active {background: #ccc;}
</style>
removeClass():
jQuery:
$(document).ready(function(){
$(”p.list”).click(function(){
$(this).removeClass(”list”);
});
});
The CSS:
<style type=”text/css”>
p {
float: left;
width: 33.3%;
padding: 0;
margin: 0;
margin-right: 10px;
padding: 20px;
}
.list{
margin-right: 10px;
padding: 20px;
background: #CCCCCC;
}
</style>
toggleClass():
jQuery:
<script>
$(document).ready(function(){
$(”p.list”).click(function(){
$(this).toggleClass(”active”);
});
});
</script>
The CSS:
<style type=”text/css”>
p{
float: left;
width: [...]
jQuery addClass(), removeClass(), toggleClass() Tutorial
Understanding Search Engine Models
To understand search engines and search engine marketing, one must first understand the search engine model. There are two fundamentally different types of search engine back ends: site directories and spidering search engines. Site directory databases are built by a person manually inputting data about websites. Most directories include a site’s url, title, and description [...]
Inspiration Windows 7 Wallpapers
1. Nature leaves wallpaper
2. The Falls
3. Windows 7 Energize
4. Character
5. Ferrai
6. Barren Border
7. Colors of New England
8. Mystic Forest
9. Energy Flow
10. Blue Sky
11. Lough Key Forest Park
12. Grasmere Village
13. Washington Azaleas
14. Windows 7
15. Landscape
16. Windows 7
17. Natural Windows
18. Vista Inspiration in Windows 7
19. Windows 7
20. The Energy
[...]
JavaScript Built in Object, Method, Properties & Handling Events in browser
JavaScript is an Object Oriented Programming Language. It is completely centered around objects. May if you are newer you have question about What is an object? so the very short answer is everything is object.
In the context of a web page, a JavaScript object is any scriptable HTML element – that is any HTML [...]
How to Create a MovieClip Rotating around the Center Continiously
This article explain you how to create an object which rotate around the center continiously. In this tutorial you will learn more about the center and math, sine/cos/degrees/radians. Here I am going to explain you with the action script:
First Create an object of any shape which you want to rotate around the circle. And [...]
Featured Articles
31 Grunge WordPress Theme...
Grunge design is most popular among designers, it's have been trend in wordpress [+]
Top WordPress Themes from TOPWPTHEMES...
1. Unistar Features:2 Columns, Adsense Ready, By Zinruss, Fixed Width, Left Sidebar, WP Themes, Widget Ready Download [+]
Adsense Ready Wordpress Themes...
Using a WordPress theme with distinct ad blocks and optimized ad placements will very likely [+]
Top Ten Real Estate Theme from Themes Ju...
Today I was looking for some Real Estate WordPress Theme. I found site Taree Internet [+]
Archives
-
Recent Posts
Recent Articles
- 10 Simple PHP Login Sytem Tutorial
- An Introduction to Object Oriented PHP
- 25 Awesome web design/development + graphics/UI+resources/tutorial sites
- CSS Positioning, Layout and Understanding CSS z-index
- PHP Image File Upload Tutorial
- jQuery addClass(), removeClass(), toggleClass() Tutorial
- Understanding Search Engine Models
- Inspiration Windows 7 Wallpapers
- JavaScript Built in Object, Method, Properties & Handling Events in browser
- How to Create a MovieClip Rotating around the Center Continiously
Popular Tags
- 3 columns 125x125 Advertising-Ready Action Script Adsense Adsense Ready Ajax comments CSS Download download icons Flash free icons free themes Icons Inspiration JavaScript Jquery jquery slideshow magazine themes Manage Comments navigations Photoshop php Plugins rss rss icons set SEO SEO Expert SEO Plugins SEO Tips spam spam protection theme Themes twitter icons Wallpaper web 2.0 wordpress WordPress Code wordpress contents in other pages WordPress How-To wordpress theme wordpress themes Word Press Tips WP-Hacks
Recent Feedbacks
- Shahriar Hyder: Very nice article mate. I have also linked to yours from my blog post below where I am trying to...
- neo: I would be better if you should add button “next” and “prev”..
- cheap phenteramine: This is certainly the best that I read today in the Internet
- Bill Bartmann: Excellent site, keep up the good work
- Bill Bartmann: Hey good stuff…keep up the good work!
Most Commented
- Display Wordpress content outside of your blog (15)
- Top 10 Magazine WordPress Themes from Premiumthemes (9)
- WordPress Meta-Tags Plugin (4)
- Simple JQuery Image Slide Show with Semi-Transparent Caption (4)
- Web 2.0 and SEO (3)
- Photoshop Tutorial Sites (2)
- How to: Embed Google Ad in your post (2)
- Wordpress Tips and Tricks (2)
- Digital Photography Tutorial and Tips (2)
- Useful Wordpress Tricks to Make Your Theme Even Better (2)

RSS Feeds
Feed Comment 



