Menu icon Foundation
Destroy Tooltips creates js errors

Hi,

 

I am unable to change the html code - so in a perfect world I would simply remove the tooltips call. So - if the description is blank - it will show a blank tooltip.

Now - I thought destroying tooltip would work - but it creates js errors on hover as it still calls them:

http://codepen.io/iamrobert/pen/xVavPz

 

Uncaught TypeError: Cannot read property 'hoverDelay' of null(anonymous function) 

Uncaught TypeError: Cannot read property 'stop' of nullhide

 

<label class="control-label has-tip right" data-tooltip data-disable-hover="false" tabindex="1" aria-haspopup="true" title="" for="Email" data-bws="">

<label class="control-label has-tip right" data-tooltip data-disable-hover="false" tabindex="1" aria-haspopup="true"  title="ToolTip"  for="Email" data-bws="ToolTip">
$(document).ready(function(){
	$("label.control-label").each(function(){
		
			if($(this).data("bws").length <=0){  	
			$(this).removeClass("has-tip right");
			$(this).foundation('destroy');
			}
		
		
	});

});

 

tooltip

Hi,

 

I am unable to change the html code - so in a perfect world I would simply remove the tooltips call. So - if the description is blank - it will show a blank tooltip.

Now - I thought destroying tooltip would work - but it creates js errors on hover as it still calls them:

http://codepen.io/iamrobert/pen/xVavPz

 

Uncaught TypeError: Cannot read property 'hoverDelay' of null(anonymous function) 

Uncaught TypeError: Cannot read property 'stop' of nullhide

 

<label class="control-label has-tip right" data-tooltip data-disable-hover="false" tabindex="1" aria-haspopup="true" title="" for="Email" data-bws="">

<label class="control-label has-tip right" data-tooltip data-disable-hover="false" tabindex="1" aria-haspopup="true"  title="ToolTip"  for="Email" data-bws="ToolTip">
$(document).ready(function(){
	$("label.control-label").each(function(){
		
			if($(this).data("bws").length <=0){  	
			$(this).removeClass("has-tip right");
			$(this).foundation('destroy');
			}
		
		
	});

});

 

Max Hopper about 3 years ago