0
Welcome Guest! Login
0 items Join Now

SOLVED jquery in gantry theme module

    • gruvhip's Avatar
    • gruvhip
    • Jr. Rocketeer
    • Posts: 49
    • Thanks: 0

    SOLVED jquery in gantry theme module

    Posted 10 years 8 months ago
    • Ok I'm stumped- I have tried many variations on trying to get a simple expand script to work or any javascript in a module. The site is a brand new Gantry Rocketlauncher for Joomla 3.3

      I am using a jquery script called expand.js. I put it in the gantry js folder, called it from the index.php and I see it on the page when it loads. So it seems the script is loading fine.
      then in the module I put:
      <script type="text/javascript">

      $(function() {

      $("h6.expand").toggler({method: "slideFadeToggle"});

      });

      </script>
      <h6 class="expand">Get the Answer</h5>
      <div class="collapse">
      <p>Answer: Lorem ipsum dolor sit amet.
      </p>

      The code works just fine when setting it up in Dreamweaver but when I put it or even simpler javasript in the module it just does nothing. I am also using either no editor or Rokpad (which I love BTW)

      It must be something silly I am not doing. Any help appreciated!!!

      Ken
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22291
    • Thanks: 3227
    • messin' with stuff

    Re: SOLVED jquery in gantry theme module

    Posted 10 years 8 months ago
    • we really can't (I certainly can't) help your debug a custom script here... it's well beyond the scope of RT support anyways... you're always free to post whatever though in case some member can be of assistance...

      scripts can sometimes, but not always, work in modules... I'd recommend sticking it in JUMI ( 2glux.com/projects/jumi ) and then using the JUMI shortcode to call the script in your module
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
    • gruvhip's Avatar
    • gruvhip
    • Jr. Rocketeer
    • Posts: 49
    • Thanks: 0

    Re: SOLVED jquery in gantry theme module

    Posted 10 years 8 months ago
    • I appreciate the response. The javascript is a sample of what I want to do, but my problem seems to be I can't get any javascript to work in the module. I can't even seem to get simple javascript code to work, yet I see the jquery 1.11.1 that is included with the theme does load. The script I refer to works fine outside of Joomla. Am I putting in the javascript or code in the module wrong?
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22291
    • Thanks: 3227
    • messin' with stuff

    Re: SOLVED jquery in gantry theme module

    Posted 10 years 8 months ago
    • try Jumi... Joomla modules were never meant to run scripts natively

      this has nothing to do with Gantry or the template
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
    • gruvhip's Avatar
    • gruvhip
    • Jr. Rocketeer
    • Posts: 49
    • Thanks: 0

    Re: SOLVED jquery in gantry theme module

    Posted 10 years 8 months ago
    • Thanx Matt! I am trying to figure out Jumi now. Their instructions aren't real clear. I greatly appreciate your response!
      Ken

Time to create page: 0.068 seconds