i tried to make a sidebar permanently hidden until a .click eventhandler with the fade-in event until the event will be triggered, and the text of this bar should slid-down (speed of 500). Unfortunatly i tried and tried and googled lot of these functions/eventhandler? but couldnt figure it out how to make this work as wished.
and the id #about is the side bar, the id #about_me is an list item that should trigger the event, the id#about_profile is the content of the sidebar.
now back to main content, here is the code:
//second js code .css('visibility','hidden')
$('#about').css('visibility','hidden')
$("#about_me").click(function(){
$("#about").fadeIn(500);
$('#about_profile').slideDown(200)({
});
});
my second question is, why isnt this event not taking place? following code:
$('#about').css('visibility','hidden',function(){
$("#about_me").click(function(){
$("#about").fadeIn(500);
$('#about_profile').slideDown(200)({
});
});
thank you for help
kind regards
ps: i ve searched even stackoverflows AQL(Asked-question Library)
The jQuery
.cssmethod doesn’t accept a callback, and it is synchronous, meaning it doesn’t actually need a callback parameter. Your first snippet is the correct way to do this.