• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

How To Remove jQuery Script On A Mobile Device Or Specific Screen Width?

This tutorial shows you 2 ways to prevent jQuery from working at a specific screen width. The tutorial is written in response to this question from a member.

Thanks for the tutorial. Do you know how to remove this script on a mobile device or certain media query?

Firstly, lets take a look at the jQuery script in question and test the modified version which conditionally disables the header scrink script from running when the screen size is reduced to any width you include in the code. In this case its 1023px.

Here’s the 2 solutions you can use in any jQuery script or in this case, if you’re wanting to disable the jQuery for the header shrink in the Centric Pro child theme, you’ll find the fully modified jQuery below.

Register for full access

Centric Pro Theme

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags