Pixel sanity check. props filosofo, fixes #13470.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2010-05-21 23:35:37 +00:00
parent 9f255f3a1e
commit c84bc2e846
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -55,7 +55,8 @@ var wpNavMenu;
// jQuery extensions
$.fn.extend({
menuItemDepth : function() {
return api.pxToDepth( this.eq(0).css('margin-left').slice(0, -2) );
var margin = this.eq(0).css('margin-left');
return api.pxToDepth( margin && -1 != margin.indexOf('px') ? margin.slice(0, -2) : 0 );
},
updateDepthClass : function(current, prev) {
return this.each(function(){
File diff suppressed because one or more lines are too long