Jquery Header Selection based on inbuilt CSS class .ui-accordion-header -


i trying select headers presents in accordion of inbuilt css class , trying disable each header using below statement.

  $('.ui-accordion-header').attr('disabled', true); 

it works fine in ie9 starts giving script errors when tried in ie 7. using jquery-1.7.1.min.js & jquery-ui-1.8.17 version of jquery ui.

basic intent disable navigation next panes current active pane on click of header since have controls inside each pane control navigation next panes.

once next panes open users can go previous panes , current pane not next panes.

error scrernshotenter image description here

 <script type="text/javascript">         $(document).ready(function () {             // on page ready first init of accordion             $('#accordion').accordion(                 {                     autoheight: false,                     animated: true,                     collapsible: true                 });              $('.ui-accordion-header').attr('disabled', true);          });     </script> 

i able put debugger , found out error within jquery framework. breaking in ie7, ie 9 dont such errors. enter image description here

found work around solve issue:

<script type="text/javascript">         $(document).ready(function () {             // on page ready first init of accordion             $('#accordion').accordion(                 {                     autoheight: false,                     animated: true,                     collapsible: true,                     changestart : function(event,ui){                          ui.newheader.attr("disabled",false);                     },                     create: function (event, ui) {                     $('.ui-accodrion-header').attr("disabled", true);                 }                 });     }); </script> 

this works perfectly...

mentioning if faces issue again.


Comments