below is my function , this function expands and collapses   div   with id
'collapsible_div_outer'.
this works fine for a page just with one div , need suggestions on how to
make this generic so that where ever i call this function  i will pass the
id's, please help me modify this function to pass parameters  
<code>
        <script type="text/javascript">
                function test(){
                      if(jQuery("img#collapsible_indicator").attr("src") ==
"/audit/images/plus.png")
                      {
                        $("#collapsible_div_outer:hidden").slideDown("fast");
                        $("img#collapsible_indicator").attr("src",
"/audit/images/minus.png");
                        $("span#collapsible_text").html("Hide Audit Tabs"); 
                        return;                   
                      }
                      if(jQuery("img#collapsible_indicator").attr("src") ==
"/audit/images/minus.png")
                      {
                        $("#collapsible_div_outer").slideUp("fast");
                        $("img#collapsible_indicator").attr("src",
"/audit/images/plus.png");
                        $("span#collapsible_text").html("Show Audit Tabs");
                      }
                    }
        </script>       

</code>
-- 
View this message in context: 
http://www.nabble.com/jquery---for-expand-and-collapse-tp22488855s27240p22488855.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to