0 Replies - 1172 Views - Last Post: 27 November 2012 - 02:13 AM

#1 T0mA  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 43
  • Joined: 07-December 09

Disable/Lock jQuery UI Accordion Headers

Posted 27 November 2012 - 02:13 AM

i want to disable/lock accordion headers. I got 4 of them and when the user goes through the process i enable the headers 1 by 1. I found a related question about this here , and i use the code. The script "locks" the specific headers in the way that when the user clicks it , it opens and closes. Is there a way that the user cant even open it? Even for a short time?

 $(function() {
 var icons = {
        header: "h3",
        activeHeader: "ui-icon-circle-arrow-s"
 };
    $( "#prod_accordion" ).accordion({
        active:<?php echo $db_obj->getValue('status') ? 'acc_'.$db_obj->getValue('status') : 'acc_0'; ?>,
        icons: icons,
        autoHeight: false ,
        change: function(event, ui) {
            var newIndex = $(ui.newHeader).index('h3');
            if (jQuery.inArray(newIndex , accordion_array) == -1) {
                var oldIndex = $(ui.oldHeader).index('h3');
                $(this).accordion('activate' , oldIndex);
            }
        }

    });
});


Is This A Good Question/Topic? 0
  • +

Page 1 of 1