MyBB Community Forums

Full Version: How jQuery "Slide Toggle" work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2013-07-10, 05:08 AM)ikhwanulfikri Wrote: [ -> ]Yes bro.
to call jscript file that you created in a template must exist this code:

{$headerinclude}

What should I rename the "toggle" inside the script to?
Yes.
You can change the name of the file that you created it. provided it's not the same with the name of the default MyBB javascript file.
no need to rename the function toggle. it doesn't work if renamed!
(2013-07-10, 05:14 AM)ikhwanulfikri Wrote: [ -> ]Yes.
You can change the name of the file that you created it. provided it's not the same with the name of the default MyBB javascript file.

Okay, my script file is here (not sure if you can see it.)
http://vizzy.visualizeedits.com/jscripts/signin.js
http://gyazo.com/90b74232031f87c11051e26fe9b16a3a

and this is my headerinclude
http://gyazo.com/7cc1705f801efb97912c91e24afe9e8e
That's it right?

Now all I have to do is fix my jquery html?
Okay this is my
header_welcomeblock_guest
http://gyazo.com/43ba47c36544f179d713efccc6efa40c

Do I put it in there instead of headerinclude or do I put it in there as well too?
http://gyazo.com/cc4a505da982f6f0a62f5e71f7c9b3ae

Please help me! Feel like I'm getting really close and for the html part,
http://gyazo.com/d017fd2121f9e3a68337da655570199b
Look like I named everything almost the same but there are
div, class, and id.
^ I could not see loading of jQuery script in the headerinclude template
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> 
<script type="text/javascript">jQuery.noConflict();</script>
remove signin.js code from header_welcomeblock_guest
Hello bro ..
Better you use to make a style global.css there.
(2013-07-10, 05:59 AM).m. Wrote: [ -> ]^ I could not see loading of jQuery script in the headerinclude template
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> 
<script type="text/javascript">jQuery.noConflict();</script>
remove signin.js code from header_welcomeblock_guest

Okay like this?
http://gyazo.com/9a43014198d3fb8fcf024a3cab210e4b

Did you want me to replace the first line? Like this?
http://gyazo.com/1325534792cadbd0adc813694358536a

As for the header_welcomeblock_guest, how is the javascript code going to know that my script need to work on that part (header_welcomeblock_guest)? So remove these?
http://gyazo.com/5a5883addf4d8db698a26ff8423abdfe
Pages: 1 2 3