The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
This code works fine in vB3, but not in 4. I am not sure why, but when I add this code in my headerinclude template and save it the page just loads to an empty page, and it doesnt actually get to saving the changes. I know it is this code, because the template saves fine when I take this out, so I just need to know why this would stop the template from saving.
Code:
<script type="text/javascript"> $(document).ready(function(){ $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav $("ul.topnav li span").click(function() { //When trigger is clicked... //Following events are applied to the subnav itself (moving subnav up and down) $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up }); //Following events are applied to the trigger (Hover events for the trigger) }).hover(function() { $(this).addClass("subhover"); //On hover over, add class "subhover" }, function(){ //On Hover Out $(this).removeClass("subhover"); //On hover out, remove class "subhover" }); }); </script> |
#2
|
||||
|
||||
![]()
No help at all?
|
#3
|
|||
|
|||
![]()
you have given us no error, no html and no confidence you've attempted to work through any possible solution. You haven't told us what the expected result is, and what the actual result is.
"this doesn't work" is not the right way to approach asking for a solution |
#4
|
||||
|
||||
![]()
Hello, the braces are making the template engine evaluate their content. Wrap the whole thing with
Code:
<vb:literal> </vb:literal> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|