Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • tempusserbia Friend
    #130070

    I want to use JavaScipts in customizing template, ie mootools or lightbox. Is there any tutorial or user guide how to implement them in template manually (without using mambots or similiar) ?!

    Menalto Friend
    #256356

    Lets say you wanna use some mootools effects in your template.
    First you need to make sure you have mootools included:

    <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/mootools.js"></script>
    Next step is to include your script:

    <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/myscript.js"></script>
    Make sure you add mootools first and your script after.
    To use the script it all depends on what kinda script you have.
    If you gonna use some lightbox sort of thing you get the info from the creator on how to use it, it can be something like:

    <a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

    tempusserbia Friend
    #256417

    I supose that first 2 lines go to header section of template, between <head> and </head> tags?

    nathanbohn Friend
    #256418

    yes, you are correct

    Menalto Friend
    #256430

    My mistake there, forgot to write that..

    tempusserbia Friend
    #256434

    Thanks, it’s clear now.

    mj1256 Friend
    #265564

    I know this is an old thread, but I am so close to getting this to work

    I’m using joomla 1.0.15
    corona 1.0.15
    http://www.interwebshop.com

    here is the code in my head

    <!-- points to the template directory, slideshow works, but menu disappears
    <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>js/mootools-release-1.11.js"></script>
    <link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/slimbox.css" type="text/css" />
    <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>js/slimbox.js"></script>
    -->
    <!-- points to the css and ja folders in root, slideshow works, but menu disappears
    <script language="javascript" type="text/javascript" src="/js/mootools-release-1.11.js"></script>
    <link rel="stylesheet" href="css/slimbox.css" type="text/css" />
    <script language="javascript" type="text/javascript" src="/js/slimbox.js"></script>
    -->

    if I enable either the first set or the second set, the slimbox works perfectly, the paths and code are correct, but… the slider menu at the top disappears

    I left them commented out as the site is live and I have the css, js, and mootools files in both places.

    I just can’t find the conflict,

    mj1256 Friend
    #265597

    bump for an answer

    Sherlock Friend
    #265781

    Hi mj1256 !
    Have you solved the problem ? i have checked your site , slide menu at the top appears now.

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 5 voices, and was last updated by  Sherlock 16 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum