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
- How to add a shortcode button to the TinyMCE editor?
- Custom media upload content for inserting custom post shortcode
- Checking if an attribute exists in a shortcode
- how to include other plugins css files in a shortcode?
- enqueue script only if it is not already enqueue
- Handling jQuery Component Collision
- Using standard backend elements in Plugin
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Is dynamic forms/entries possible in Widget?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Editor not displaying dynamically after clicking on the button
- How to fetch serialized data from wordpress options
- Why is my ajax call refreshing the page?
- How do I use WordPress PHP functions in my Javascript code?
- Admin-ajax.php is dying “0” without processing function
- How do I register a stylesheet inside a WordPress widget?
- Layout shop page: resize images and columns
- How to create popup same as wordpress popup feature
- jQuery function didn’t work in my plugin
- Handling jQuery Component Collision
- Check if email address exists front end with AJAX in a plugin
- 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
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- 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]
- Making a Template for a CPT created by a plugin
- jQuery for custom plugin not working with Divi theme
- 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?
- Images under 1MB are not being compressed
- plugin dev – minimum base css specificity?
- 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
- jQuery code didn’t run on my plugin
- Ajax request sends url rather than data
- Themes conflicts and overrides my WordPress Support widget Plugin styles
- Pass PHP variable to javascript
- 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
- 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
- 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
- Can’t find variable is_single in my jQuery plugin
- 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
- Ajax, jQuery and WordPress
- Why function hooked using object are executing at all time?
- How to get site homepage from plugin?
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- Ajax in Plugins: returns the whole page
- Element works, but not on wordpress site [duplicate]
- Shortcode return is printing a 1 afterward
- Load css classes after using ajax calls
- Any way to hook into WP after a page displays?
- Integrating WordPress Content into a jQuery Slider
- Jquery post responses 500 error after some time and lastly an 503 error
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- How to add an active state class to my info box