Reputation: 49404
I have a JQuery function:
function MyFunction() {
//I need a command here to show a hidden div
....
}
<div id="hiddenDiv" style="display:none"></div>
Basically, I need to Div above to show when the function is called.
Thanks
Upvotes: 0
Views: 1155
Reputation: 29160
There are many options.
<div id='hiddenDiv' style='display:none;'></div>
then...
MyFunction('hiddenDiv');
function MyFunction(divId) {
//$('#' + divId).show();
$('#' + divId).fadeIn('fast');
//$('#' + divId).slideDown('fast');
}
Upvotes: 0
Reputation: 16858
What's wrong with using $('#hiddenDiv').show()
?
function MyFunction() {
$('#hiddenDiv').show();
....
}
Upvotes: 2