Browse Source

Revert "Fix VMM.Library.prop and VMM.Library.attribute"

This reverts commit facd6fa7db.
pull/781/head
Joe Germuska 10 years ago
parent
commit
31fccd351b
  1. 25
      source/js/Core/Core/VMM.Library.js

25
source/js/Core/Core/VMM.Library.js

@ -274,27 +274,28 @@ if(typeof VMM != 'undefined') {
} }
} }
}, },
prop: function(element, aName, value) { prop: function(element, aName, value) {
if (typeof jQuery == 'undefined' || !('prop' in jQuery.fn)) { if (typeof jQuery == 'undefined' || !/[1-9]\.[3-9].[1-9]/.test(jQuery.fn.jquery)) {
return VMM.Lib.attribute(element, aName, value); VMM.Lib.attribute(element, aName, value);
} else if (typeof value != 'undefined') {
return jQuery(element).prop(aName, value);
} else { } else {
return jQuery(element).prop(aName); jQuery(element).prop(aName, value);
} }
}, },
attribute: function(element, aName, value) { attribute: function(element, aName, value) {
if (typeof(jQuery) != 'undefined') {
if (typeof(value) != 'undefined' && value != null && value != "") { if (value != null && value != "") {
return jQuery(element).attr(aName, value); if( typeof( jQuery ) != 'undefined' ){
} else { jQuery(element).attr(aName, value);
}
} else {
if( typeof( jQuery ) != 'undefined' ){
return jQuery(element).attr(aName); return jQuery(element).attr(aName);
} }
} }
}, },
visible: function(element, show) { visible: function(element, show) {
if (show != null) { if (show != null) {
if( typeof( jQuery ) != 'undefined' ){ if( typeof( jQuery ) != 'undefined' ){

Loading…
Cancel
Save