Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in the js code #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

python2and3developer
Copy link

I made these improvements:

  • Inside the function forward. The event handler for mouseover is only attached if $this.opts.pauseonhover is true. Before the handler is attached anyway and the condition was checked inside the handler.
          if ($this.opts.pauseonhover) {
            $this.mouseover(function () {
                clearTimeout(t);
            });
          }
  • The block of the if condition:
if (! $this.data( 'tabslet-init' ) ) {
...
}

is very big.
The function returns early if the tabselt-init data attribute was set.

if ( $this.data( 'tabslet-init' ) ) return;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants