Download & Extend

jQuery 1.7 and .attr()

Project:Admin
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

There's a problem here in jQuery 1.7:
var clone = $('')
.attr('href', $(breadcrumb[key]).attr('href'))
.attr('class', $(breadcrumb[key]).attr('class'))
.html($(breadcrumb[key]).html())

If $(breadcrumb[key]).attr('class') is undefined, .attr will return a string and .html will fail.

Comments

#1

Patch attached:

AttachmentSize
1354328_admin_jquery17_error.patch 1.3 KB

#2

Status:active» needs review

#3

Thanks aidanlis, that worked perfectly!

nobody click here