Accompanying jsFiddle with reproduction of problem: http://jsfiddle.net/ComradeF/M9e94/
I am using Foundation and Knockout together on a project. One of the challenges I faced was that when new tabs needed to be rendered, Knockout would comply, but clicking the tabs wouldn't do anything. The solution to that was a call to $(document).foundation('reflow')
in a custom binding. Unfortunately, that solution may be either insufficient or just plain wrong, as it is now associated with an error I am receiving.
I tried to add tooltips to the tabs and some of their content via the data-tooltip
attribute in my markup, only to get errors on line 1422 of jQuery 2.1.0. That line is elem.getAttribute( name )
, and the error is undefined is not a function
. In this situation, elem
is a comment, and thus has no getAttribute()
function.
The error can be eliminated either by removing the comment (<!-- this is a comment -->
) in the markup, or by removing the data-tooltip
attribute in the tab's link.
I realize the quick fix is for me to remove the HTML comments from my markup, but I feel like this may be a symptom of something worse lurking... so I'd prefer to investigate and solve rather than take the easy way out.