Jump to content
  • 0

Problem z jQuery


revo86

Question

Witam.

 

Mam problem w wlozeniem do cmsa tego skryptu:

 

<script type="text/javascript">
jQuery(function () {
    $("div").hide();
    
    $(".toggler").click(function () {
        var item = $($(this).data("toggle"));
        $("div").not(item).slideUp("slow");
        item.slideToggle("slow");
    });
});
</script>
 
Skrypt jest on od rozwijanej belki ktora pokazuje lub chowa tekst. Po wlaczeniu tego cmsa strone widze przez sekunde a potem robi sie cała biała. Zeby zapisywac javascript zmienilem kilka linijek w validate.php tak jak to bylo opisywane na forum.
 
Probowałem tez w taki sposob dodać skrypt do cms.tpl
 
{if $cms->id==12}
{literal}
<script language="javascript">
jQuery(function () {
    $("div").hide();
    
    $(".toggler").click(function () {
        var item = $($(this).data("toggle"));
        $("div").not(item).slideUp("slow");
        item.slideToggle("slow");
    });
});
</script>
{/literal}
{/if}
 
i dalej to samo.
Edited by revo86 (see edit history)
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...