Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Friday, April 12, 2013

Problem with JQuery Show() Method when an html control is in Show() state.

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();
     }


No comments:

Post a Comment