Code not running at loading Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Code not running at loading

    Niko
    Niko
    Helper
    Helper


    Male Posts : 3285
    Reputation : 254
    Language : English, Italian, French
    Location : Italy

    Solved Code not running at loading

    Post by Niko Tue 27 May 2014 - 23:34

    Hello

    I have this code that should be executed when the page opens, but it doesn't pale

    where is the mistake?
    Code:
    $(window).load(function() {

    if(_userdata["user_posts"] < 1 && _userdata["session_logged_in"] == '1'){
          $('#fa_toolbar').before('HTML CONTENT');
    }
    });

    actually I tried to run it via the google chrome console and it worked, but not from Javascript panel in ACP  What a Face 

    Thanks in advance


    Last edited by Niko! on Thu 29 May 2014 - 17:48; edited 1 time in total
    SSYT
    SSYT
    Forumember


    Male Posts : 77
    Reputation : 15
    Language : RO-10, EN-3, FR-1
    Location : Romania

    Solved Re: Code not running at loading

    Post by SSYT Wed 28 May 2014 - 6:47

    Try, i'm not 100% to working.
    Code:
    jQuery(function($) {
        window.onload=function() {
            if(_userdata.user_posts == '0' || _userdata.session_logged_in == '1') { /* 0 or -1 try of user_post */
                $('#fa_toolbar').before('HTML CONTENT');
            }
        };
    });
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3285
    Reputation : 254
    Language : English, Italian, French
    Location : Italy

    Solved Re: Code not running at loading

    Post by Niko Thu 29 May 2014 - 20:48

    I solved on my own Wink

    Instead of using .load, I used another method
    thanks anyway :rose:
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Code not running at loading

    Post by SLGray Fri 30 May 2014 - 2:55

    Thanks for posting the solution.

    Topic Solved & Archived



    Code not running at loading Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.