We help IT Professionals succeed at work.

Why jQuery accordian is reacting when I click on gridview control?

lapucca
lapucca asked
on
Hi, I'm using vs2012.
I'm using this jQuery plugin, http://api.jqueryui.com/accordion/ 
1.  How can I configure it so it's collapsed when the page is loaded.
2.  How can I get it to stop expanding when I click on the Edit button on my gridview control?

This script is in the head tag section of my Site.Master file,
    <script>
        $(function () {
            $("#accordion").accordion({
                collapsible: true
            });
        });
    </script>

Thank you.
Comment
Watch Question

Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
If you want all panels collapsed, set the active property to false:

$("#accordion").accordion({
    collapsible: true,
    active: false
});

Open in new window


As for your other question, we'd need to see your page.

Author

Commented:
Just adding the line "active: false", solved both my problems.  Thank you.