jQuery toggling without using toggle

//set initial status
    if( $(this).data('status') == 'clicked' ) {
        //your code in case of second click
    } else {
        //your code in case of first click

jQuery toggling without using toggle

What it does:

Sets the initial status – not_clicked

In case of a click:

  • If the current status is clicked sets it to not_clicked (reset) and runs scripts
  • else – changes status to clicked and runs scripts.

Checkout some common problems.

Get Unique Post Meta Values From a Meta Key
How to make a custom widget area in wordpress?
How to Add Page Slug in Body Class of your WordPress Theme ?
How to make scroll to top ?
Media upload default linking (change the attachment link to none in WordPress)