diff --git a/includes/jquery.drilldown.js b/includes/jquery.drilldown.js index 5e085fb..5e5cd21 100644 --- a/includes/jquery.drilldown.js +++ b/includes/jquery.drilldown.js @@ -84,11 +84,16 @@ // We don't use the $().clone() method here because of an // IE & jQuery 1.2 bug. var clone = $('') - .attr('href', $(breadcrumb[key]).attr('href')) - .attr('class', $(breadcrumb[key]).attr('class')) - .html($(breadcrumb[key]).html()) - .addClass('depth-'+key) - .appendTo(trail); + .html($(breadcrumb[key]).html()); + + // We don't chain $().attr() method since it may return + // undefined in jQuery 1.6+. + clone.attr({ + 'href': $(breadcrumb[key]).attr('href'), + 'class': (('depth-'+key)+' '+$(breadcrumb[key]).attr('class')) + }); + + trail.append(clone); // We add a reference to the original link and a click handler // that traces back to that instance to set as the active link.