Fix some JS glitch with external use

This commit is contained in:
Michel Roux 2013-08-21 13:26:38 +02:00
parent 51ec649b3b
commit 6c29ff80d2
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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');