coder
coder

Reputation: 1929

Checkboxes instead of icons in Accordion?

In jQuery UI's Accordion, is it possible to have a checkbox instead of the icon?

Upvotes: 0

Views: 186

Answers (1)

daniel__
daniel__

Reputation: 11845

Did you mean this?


  $(function () {
      $("#accordion").accordion();
  });

  $(".ui-accordion-header-icon").each(function (index) {
      $(this).replaceWith('<input type="checkbox" name="xpto" value="' + index + '">')
  });

  $('#accordion input[type="checkbox"]').click(function (e) {
      e.stopPropagation();
  });

replacewith

stoppropagation

Upvotes: 2

Related Questions