I have two divs Div1 and Div2.
I opened Div1 and Div2.
I div1 function i need to close Div2. Suppose if i open Div1 and Div2 both then div2 is also in show() state. If div is in show state and if you try to perform show() on Div2 then you will get the error "object doesnt support this property or method". To avoid this you have to check whether the object div2 is in hide() mode or not.
Example:-
if($('#div2').hide())
{
//Perform show Operation.
$('#div2').show();
}
I opened Div1 and Div2.
I div1 function i need to close Div2. Suppose if i open Div1 and Div2 both then div2 is also in show() state. If div is in show state and if you try to perform show() on Div2 then you will get the error "object doesnt support this property or method". To avoid this you have to check whether the object div2 is in hide() mode or not.
Example:-
if($('#div2').hide())
{
//Perform show Operation.
$('#div2').show();
}
No comments:
Post a Comment