Your shortcode should add a unique id and not only a class. This can be an explicit id attribute (best) or by generating some random id. Now when outputting the shortcode you add a JS which uses specific selection based on the id.
Related Posts:
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Can someone please tell me what is wrong with my plugin?
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- WP Plugin CSS not being applied to page
- jQuery function didn’t work in my plugin
- Handling jQuery Component Collision
- Check if email address exists front end with AJAX in a plugin
- How do I write into a file (css)
- Demystifying and understanding shortcode nomenclature
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- How to generate CSS from a shortcode within a plugin
- Custom CSS for plugin form
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- Input with spaces in Shortcode attributes overwritten by defaults
- Best approach to fetch data from wp options to js file or php file
- Allow users of my plugin to define their own shortcode rather than use mine?
- custom changes removed after plugin update
- How to put JQuery/Ajax inside shortcode?
- WordPress function not being called from jQuery method
- How to tie dark mode with prefers-color-scheme webkit? [closed]
- Ajax contact form widget plugin data not insert in database
- Making a Template for a CPT created by a plugin
- creating html reusable blocks via shortcodes
- Single API call exposed via shortcode with params
- How to hide CSS by default and show on button press
- jQuery for custom plugin not working with Divi theme
- What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?
- Creating shortcodes in plugin
- How to create a custom shortcode based on the layout?
- How to prevent plugins from loading jQuery
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Adding CSS to custom post type admin page causes error
- Namespaced shortcode?
- Stop Plugin from Getting Styles from Other Plugin
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Why am I unable to load scripts in head in plugin?
- How to add an element right after the article using jQuery?
- Images under 1MB are not being compressed
- plugin dev – minimum base css specificity?
- IF condition based on wp_remote_get output
- Shortcode Attributes to Return different $_POST
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- Save user total active time after login in wordpress [closed]
- How to use template inside plugin shortcode with variables for big HTML code
- strange shortcode error: does shortcodes requires any dependency?
- How do I make sure that my plugin only runs on article detail pages?
- change or add css to theme from plugin
- How to rewrite URL and get the values?
- How to prevent tabs from opening all at once
- Custom CSS not being added by plugin
- Load CSS files in header of Bones theme?
- jQuery code didn’t run on my plugin
- Ajax request sends url rather than data
- Adding a jQuery modal dialog to the admin area
- Themes conflicts and overrides my WordPress Support widget Plugin styles
- Pass PHP variable to javascript
- Want to create custom design of progress indicator in wpforms
- Two plugins using the same CSS id
- wc_get_template_part doesnt display the content [duplicate]
- Thumbnail image doesn’t show up in Shortcode output
- list of custom post by custom field in frontend
- Overriding inline !important CSS with Javscript code snippet with media query
- Shortcode do not return the right data in post
- How to call function in WordPress on button click?
- How to properly enqueue jQuery knob on WordPress without conflict?
- Hide content for specific users with id
- Why is my shortcode not working?
- JS working when used normally but not in wordpress
- SASS not showing in customized preloader plugin
- update_post_meta is not working for me when I use e.preventDefault for update button
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress Thickbox Navigation Issue in Gallery
- Dynamic input fields in WordPress Plugin
- Overwrite js code using WP_Footer
- Not displaying Woocommerce product page in lightbox
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- Modify Plugin PHP Class in Child Theme – Correct Method
- Storing Array of values into wordpress options
- how to add custom css at top above all css file for specific url
- Can’t find variable is_single in my jQuery plugin
- Javascript in plugin not working
- How to Add Jquery FullCalendar in wp plugin in admin
- WordPress ajax not working in registration
- Shortcode in a blog post, footer and related products stop working
- shortcode which is introduced into entry the blog, and appears in side bar
- How to add jquery to my custom post type wp plugin
- Like/Dislike Bar not working when updating
- Possible jquery / library conflict in plugin usage
- Ajax, jQuery and WordPress
- Why function hooked using object are executing at all time?
- Shortcode registered from a plugin not recognized
- How to get site homepage from plugin?
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- get_option include in my adsense
- Ajax in Plugins: returns the whole page