• Hello
    I’m trying your plugin in front page not single page.
    so, there are several posts and several comments..
    unfortunately, i’m not handy at javascript…^^;;
    expecially, when clicking emoticon, the emoticon is displayed in first comment form….T.T

    Would you see my code?
    this is what i customizing.

    function scut(){
    global $KEReplace;
    $opt = get_option(‘Locco_Ro_emoticons’);
    echo “<div style=\”cursor:pointer;margin:2px\” ><span id=’loccoEmoticonslink’ class=’loccoEmoticonslink’>Afiseaza emoticoanele</span>”;
    if ( isset($opt[‘backlink’]) && $opt[‘backlink’] ) echo ” Locco.Ro“;
    else {
    if( !isset($opt[‘backlink’]) ) echo ” Locco.Ro“;
    }
    echo “</div>”;
    echo “<div class=’loccoEmoticonscontent’ id=’loccoEmoticonscontent’ style=\”display:none\”>”;
    foreach($KEReplace as $k=>$v){
    if(isset($opt[‘stat’]) && isset($opt[‘stat’][$k])){}
    else echo ““.$v.”“;
    }
    echo “</div>”;
    }

    at this point..
    firstly, i fixed attached position like below.
    $(document).ready(function(){
    $(‘.loccoEmoticonslink’).click(function () {
    $(this).closest(‘.comment-form’).find(‘.loccoEmoticonscontent’).toggle();
    });
    });

    i need second work..
    when clicking emoticon, the emoticon is attached to closest comment form.
    it doesn’t work now

    i’m using class not id…
    var loccoEmoticonsclick = function(tag){
    var d = $(this).closest(‘.comment-form’).find(‘.comment’);
    var b = d.selectionStart, a = d.selectionEnd;
    d.value = d.value.substring(0, b) + ” ” + tag + ” ” + d.value.substring(a, d.value.length);
    };

The topic ‘Several comments’ is closed to new replies.