0

I have customised a small text rotator using Jquery which I wish to use to rotate phones numbers in a module.It can be found here: http://jsfiddle.net/tovic/xaqgn/

I have tried embedding the function in the module itself using Regular labs Sourcerer but that did not work, the code just showed up in the module position. I have then cretaed a custom JS file and pasted the function into, but that doesn't work either. The text just sits as a list.

I'm not sure what else to do/try. I haven't had to do this before, so any advice as to what i am doing wrong would be most appreciated. Regards Donna

  • You will of course need to ensure jQuery is being loaded on the page. Then check the browser console and report back any error that may be occuring. – Lodder Jan 13 '17 at 14:31
  • @Lodder Hey again, the jquery files show in the source code as loading. The only error in the console is: Uncaught TypeError: Object.extend is not a function at jquery.mtlib.js:231 (anonymous) @ jquery.mtlib.js:231 – Dtorr1981 Jan 13 '17 at 14:34
  • What is jquery.mtlib.js? – Lodder Jan 13 '17 at 14:46
1

I will try to answer - but I have questions as well.

I wish to use to rotate phones numbers in a module

Do you mean a custom module that you are developing, or using the custom html module that comes with Joomla?

I have tried embedding the function in the module itself using Regular labs Sourcerer but that did not work, the code just showed up in the module position.

This looks like it answers my above question - but still please clarify.

Now when you use a plugin's syntax inside Joomla content, and you are seeing the syntax, then likely the plugin isn't running.

Sometimes this can also be caused by the editor if you are trying to write code in your content, which might have strip tags, resulting to text representation of the code.

If you are using a custom html module, you need to make sure you have enabled the option in the module to run Joomla plugins. This can be found in the Options Tab of the custom html module and it's the Prepare Content Plugin.

I have then cretaed a custom JS file and pasted the function into, but that doesn't work either. The text just sits as a list.

That's not very clear explanation of what you have tried to do - so I can't advise much on this.

  • I hadn't enabled the 'prepare content' option in the module - Thank you for pointing it out. All is functioning as should be now. – Dtorr1981 Feb 7 '17 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.