Code not running at loading
3 posters
Page 1 of 1
Code not running at loading
Hello
I have this code that should be executed when the page opens, but it doesn't
where is the mistake?
actually I tried to run it via the google chrome console and it worked, but not from Javascript panel in ACP
Thanks in advance
I have this code that should be executed when the page opens, but it doesn't
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
Thanks in advance
Last edited by Niko! on May 29th 2014, 3:48 pm; edited 1 time in total
Re: Code not running at loading
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');
}
};
});
Re: Code not running at loading
I solved on my own
Instead of using .load, I used another method
thanks anyway
Instead of using .load, I used another method
thanks anyway
Re: Code not running at loading
Thanks for posting the solution.
Topic Solved & Archived
Topic Solved & Archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Loading Page - Leeloo Code Help
» Forumotion not loading at all, blank white with no code
» When i paste a long code via [code][/code] the page expands
» Overdark Sci-fi Universe
» Running In the Rain
» Forumotion not loading at all, blank white with no code
» When i paste a long code via [code][/code] the page expands
» Overdark Sci-fi Universe
» Running In the Rain
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum