diff --git a/bbcode.php b/bbcode.php index e90a0ae..5d074b8 100644 --- a/bbcode.php +++ b/bbcode.php @@ -71,6 +71,8 @@ if (!class_exists('cartpaujBBCodeParser')) function bbc2html($subject) { + wp_enqueue_script('mingle-forum', plugins_url('js/script.js', __FILE__), array('jquery')); + $codes = array(array(), array()); preg_match_all('/\[code\](.+)\[\/code\]/Uis', $subject, $codes); diff --git a/js/script.js b/js/script.js index 105e8ec..7ae67d6 100644 --- a/js/script.js +++ b/js/script.js @@ -116,8 +116,8 @@ function uncheckglobal(headerfield, checkform){ checkform.mod_global.checked = false; } -jQuery().ready(function () { - jQuery('.mingle-spoiler-view li:first-child').click(function () { +jQuery(function() { + jQuery('.mingle-spoiler-view li:first-child').live('click', function() { var text = jQuery(this).parent().find('li:last-child'); if (text.is(':hidden')) { text.slideDown('200');