xbsoftware / enjoyhint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Cannot read property 'enjoyHintElementSelector' of undefined

jzabate opened this issue · comments

enjoyhint plugin runs on tab content.

error occurs around code below:
$(window).on('resize', function() if (!($(that.stepData.enjoyHintElementSelector).is(":visible"))) { that.stopFunction(); $(window).off('resize'); return; }

exact line below:
if (!($(that.stepData.enjoyHintElementSelector).is(":visible"))) {

This issue still occurs even when enjoyhint is not run on a particular tab content.

My use case is running enjoyhint js on specific tab content and I've done this by detecting if the active tab content with class '.tab-content' and '.active' like:

if ( $(".tab-content").find(".active") ) { // code run enjoyhint } else { //remove .enjoyhint class if found }

This error still occurs on the code below:

$(window).on('resize', function() { if ( !($(that.stepData.enjoyHintElementSelector).is(":visible")) ) { that.stopFunction(); $(window).off('resize'); return; }

Eventhough I did not perform any resize of the browser the error still occur:
"Uncaught TypeError: Cannot read property 'enjoyHintElementSelector' of undefined".

By the way, I'm using the latest chrome browser.

Any help is very much appreciated.