내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Am i able to execute jQuery code in Target?

Avatar

Level 3

is it possible to execute jQuery code from the custom code box within Target for specific experiences? The website has the jQuery library loaded already.

I am trying to do some simple things like $('body').hide(); commands, but no such luck. The end result is to use ajax

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

stevemalko​ Yes its possible to execute jQuery using the custom code section. The same has been documented at Modifications overview and there are samples provided as well in that document .

Hope this helps answer your question.

원본 게시물의 솔루션 보기

5 답변 개

Avatar

정확한 답변 작성자:
Employee

stevemalko​ Yes its possible to execute jQuery using the custom code section. The same has been documented at Modifications overview and there are samples provided as well in that document .

Hope this helps answer your question.

Avatar

Level 3

Thanks. the mistake I was making was not wrapping it in a document.ready function. once I did that, everything worked, including ajax calls

Avatar

Employee

Awesome. Thanks for that quick confirmation.

Avatar

Level 3

Thats pretty much what I would have done as well. Check if jQuery was "ready".

Avatar

Employee

Using custom code, you can almost do whatever we do on a HTML page so you can jquery or JavaScript code enclosed within a <script> tag.

Note: if you are using some functions of jquery then make sure the relevant jquery file is present on the page.

Are you loading jquery after target on the web page ?