fixed up theme inheritance

This commit is contained in:
scottjehl 2010-10-15 16:40:06 -04:00
parent 003c114659
commit f5468482f8

View file

@ -8,11 +8,11 @@
$.fn.slider = function(options){
return this.each(function(){
var control = $(this),
themedParent = control.closest('[class*=ui-bar-],[class*=ui-body-]'),
themedParent = control.parents('[class*=ui-bar-],[class*=ui-body-]').eq(0),
o = $.extend({
trackTheme: control.data("tracktheme") || (themedParent.length ? themedParent.attr('class').match(/ui-(bar|body)-([a-z])/)[2] : 'd'),
theme: control.data("theme") || 'b'
trackTheme: (themedParent.length ? themedParent.attr('class').match(/ui-(bar|body)-([a-z])/)[2] : 'c'),
theme: control.data("theme") || (themedParent.length ? themedParent.attr('class').match(/ui-(bar|body)-([a-z])/)[2] : 'c')
},options),
cType = control[0].nodeName.toLowerCase(),