[jQuery] Changing Class using Jquery
Kindly help!!!
I am in a situation where I have to develop a news website, and my
client wants me to display three stories from each category rest all
should be hidden by default and when a user wants to view more stories
he can click "add a story" the next story with class blocked should
get visible. Same when a user clicks on "remove a story", the list
item with no class should get changed to class "blocked"
Basically i have seen this on BBC's website homepage. I will be
thankful if anyone helps me out.
All I know is that it is possible through jquery and jquery is a new
thing to me.
<div class="gkMod" id="NewsBox">
<h2><a href="#">News</a></h2>
<div class="gkSet">
<div class="gkData">
<h3><a href="/Categories/?Show=1">Frontpage</a></h3>
<p class="addremove">
<a href="#" class="add"><span class="hide">Add a Story</span>
</a>   <a class="remove" href="#"><span class="hide">Remove a
story </span></a>
<ul class="c1">
<li>
<a href="/fullstory/?Date=2_12_2008&ItemID=46&cat=1" >'Knee-jerk
reaction will shatter peace'</a>
</li>
<li >
<a href="/fullstory/?Date=2_12_2008&ItemID=45&cat=1" >Mir sits pretty
on home turf</a>
</li>
<li >
<a href="/fullstory/?Date=2_12_2008&ItemID=44&cat=1" >Kupwara
‘under-age voting’ to be probed</a>
</li>
<li>
<a href="/fullstory/?Date=2_12_2008&ItemID=43&cat=1"