• Add remove class on scroll

    This is done with event listener. It will track class “.show-on-scroll” and add and remove Class “is-visible” depending on if it’s visible in screen view or not.

  • List categories and taxonomies with class active

    List of categories for posts with link to archive and wrapped in classes To enable it for taxonomies add this line and replace ‘produckte’ with your taxonomy slug And on the end you will get this for custom categories ( taxonomies) Here is preview of HTML output:

  • Toggle text inside div

    jQuery Snipped for toggle text inside div on click. “Hello World” will be default text and text for every second click. And “Bye!” will be on first and every even click.

  • Slide toggle with jQuery

    Expand object with click on the button. The trigger is class on the object that will start the animation. Assign the class to the object that should be animated and replace 300 (milliseconds) to what you prefer Wrap this with document ready code. The final code should look like this

  • How to start with jQuery in WordPress

    This code is basic and for beginners. Usually, you can see solutions but not how to wrap jQuery code to start writing it for WordPress or Oxygen. The outer Javascript function is known as an anonymous function and jQuery is wrapped at the end, so is therefore aliased or bound to the $ selector, so in the inner function…