Opened 8 years ago

Closed 8 years ago

#7875 closed bug (worksforme)

TypeError: 'undefined' is not a function (evaluating 'elem.nodeName.toLowerCase()') [jquery.js:1904]

Reported by: skyer Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.tabs Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery version: 1.7 It raise this error when I try to call tab UI function - tabs. If add the error handling here and the tabs function works well.

    // A method for determining if a DOM node can handle the data expando
    acceptData: function( elem ) {
        if ( elem.nodeName ) {
            var match = false;
            if (typeof elem.nodeName.toLowerCase != 'undefined')
                match = jQuery.noData[ elem.nodeName.toLowerCase() ];
            if ( match ) {
                return !(match === true || elem.getAttribute("classid") !== match);
            }
        }
        return true;
    }

jsfiddle script

        <div id="mutertab" style="height:350px; overflow: auto; ">
        <ul><li><a href="#mutersetting"><span>Muter</span></a></li>
        <li><a href="#tab2"><span>Favor</span></a></li></ul>
        <div id="mutersetting">
        <p>Auto mute plurks with matched keywords</p>
        <form>
        Keyword: <input name="keyword" id="keyword" /> <button name="add" id="add" type="button" onClick="onAddClick();">Add</button>
        <button name="delkey" id="delkeys" type="button" onClick="onDelClick();">Delete</button><br>
        <select name="keywords" id="keywords" multiple="multiple" size="10" width="300" style="width: 300px;"></select> <br>
        </form>
        </div>
        <div id="tab2">
        <table><thead><tr><th width="100px">Name</th><th width="350px">Title</th></tr></thead><tbody></tbody></table>
        <br><button id="clearFavor" type="button">Clear</button>
        </div>
        </div>
<script type="text/javascript">
    $('#mutertab').tabs();
</script>

Change History (1)

comment:1 Changed 8 years ago by Scott González

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.