Title: Avoid overly specific jQuery selectors
Last modified: November 22, 2021

---

# Avoid overly specific jQuery selectors

 *  Resolved [testwp75](https://wordpress.org/support/users/testwp75/)
 * (@testwp75)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/avoid-overly-specific-jquery-selectors/)
 * **Please help to fix this issue caused by your plugin.**
 * > [View post on imgur.com](https://imgur.com/a/WJVeDYr)
 * 
    => you will find domain name in the picture “meil…ion.com”
 * `You are using too specific jQuery selectors which decrease the performance of
   your website: find out more . Here is an example of a good use of jQuery:
 * $ (“.data table.firstClass td.secondClass”);
    // More efficient: remove the intermediate//
   selector if possible $ (“.data td.secondClass”);
 * If possible, simplify the following selectors :
 * $(‘.woocommerce-ordering .drop li a’)
    $ (‘. mobile-menu li .chevron’) $(‘.review-
   box .overall .percent’)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Favoid-overly-specific-jquery-selectors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/avoid-overly-specific-jquery-selectors/#post-15090731)
 * That JavaScript (those jQuery selectors) are not part of Autoptimize, but originate
   from the theme/ plugins JS that Autoptimize combines and minifies. Disable Autoptimize
   by adding `?ao_noptimize=1` to the URL and re-run the same test to see what plugin(
   or theme) those selectors originate from (spoiler: many seem to be from wp-content/
   themes/smart-mag/js/theme.js 😉 )?
 * hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘Avoid overly specific jQuery selectors’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/avoid-overly-specific-jquery-selectors/#post-15090731)
 * Status: resolved