Hi Friends,
In one of my application I need a particular Toggle , If "+" is there then on further
click it become "-". I just plan to compare the Previous value and work according same,
but it alert Correctly but not Work...
This is my Test Function
Code:
function view_details(id) {
alert("val is:"+$("#exp"+id).text());
$("tr[id^=view_details]").hide();
$("span[id^=exp]").html('+');
if ($("#exp"+id).text() == "+" )
{
alert("IF");
$("#view_details"+id).show();
$("#exp"+id).addClass('expand');
$("#exp"+id).html('-');
} else {
alert("else");
$("#view_details"+id).hide();
$("#exp"+id).html('+');
}
}
it only Enter in IF case if the Text is actually "-" too... pls Advise me a Solution ASAP.
thankfully
Anes P.A 
|