JavaScript / JQuery

andrew-robertson
andrew-robertson Community Member Posts: 354 ♦ Idol ♦
Hi there - I need a bit of a push in the right direction.

Situation: Trying to run JQuery command but I am getting the $ is not a function error when previewing in a browser.

Process:
  • Add OnShowRunJS to the page level with the following code: $(".accordian").first().addClass("current");
  • Preview in Chrome Browser
From my understanding and the photos below, I do have JQuery available to use.


Am I wrong in assuming that JQuery can be used with a OnShowRunJS action?
Andrew R.
Developing content since 2010 using a mixed bag of tools.

Best Answer

Answers

  • andrew-robertson
    andrew-robertson Community Member Posts: 354 ♦ Idol ♦
    Well that resolved my problem. Now I have to do some JQuery work. Appreciate the insight and education as always @timk !!!
    Andrew R.
    Developing content since 2010 using a mixed bag of tools.