Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 65051

How To: Add custom JS to the Widget

$
0
0

Replies: 0

Hi Team,

I am building a custom widget using elementor. I have a js code which is to be applied for the widget based on the id provided when the widget is added. Hence, I would like to know how to add a custom JS for this widget? I am trying to use wp_add_inline_script() in the render() method. It works when the page is previewed, but does not work when elementor preview is opened.

Regards,
Chandra

  • This topic was modified 7 minutes ago by  chandra123.

Viewing all articles
Browse latest Browse all 65051

Latest Images

Trending Articles



Latest Images