Ajax breaks jQuery Toggle I use a small script that hides/shows a pane when a certain element is clicked.

(function($) {
Drupal.behaviors.luminary = {
    attach: function (context, settings) {
         $(".toggle-visible").click(function () {
         var targetselector = $($(this).attr('data-target-selector'));
         targetselector.slideToggle("fast");
      });
    }
}
})(jQuery);


It works well, but when an ajax event occurs, the pane will slide visible, and immediately slide invisible again. It goes down, and comes right back up. It only happens after an ajax event. Any ideas?
Change

$(".toggle-visible").click(function () {


for

$('.toggle-visible').unbind('click').bind('click', function() {