Sunday, 11 August 2013

Javascript - Add Variables in Jquery Command

Javascript - Add Variables in Jquery Command

function bookRemoved(bookId)
{
alert(bookId) ;
$(document).ready(function() {
$('.className').hide(1000); // Want it Here
} );}
In Above example, the bookId returns class Name. How can I use it as class
name to hide it as shown in above example.
I would like something like this:
$('.bookId').hide(1000); // Want it Here
bookId should return its value. Suppose if bookId has 23, it should look
like this. $('.23').hide(1000); // Want it Here
PS: I am new to Javascript and Jquery

No comments:

Post a Comment