jquery toggle did not work properly...

Posted by pradeep on Stack Overflow See other posts from Stack Overflow or by pradeep
Published on 2010-04-27T19:47:02Z Indexed on 2010/04/27 20:03 UTC
Read the original article Hit count: 151

Filed under:
function advanced_search()
{

$("#advanced_link").toggle( 
function(){
$('#advanced_link').text('Hide - Advanced Search');
$('.advanced_search').show();
},
function(){
$('#advanced_link').text('Show - Advanced Search');
$('.advanced_search').hide();

});
}

this code worked for me..but when i tried to use the css property like

function advanced_search()
{

$("#advanced_link").toggle( 
function(){
$('#advanced_link').text('Hide - Advanced Search');
$('.advanced_search').css('display','inline');
},
function(){
$('#advanced_link').text('Show - Advanced Search');
$('.advanced_search').css('display','none');

});
}

it did not work...is there any thing wrong in second code...??

© Stack Overflow or respective owner

Related posts about jQuery