Просмотр исходного кода

Changed the 'highlight' effect that is not available in older version of jQuery UI

Chun-Huai Cheng 9 лет назад
Родитель
Сommit
1049b20ee7
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      tripal_fields_layout/theme/js/tripal_fields_layout.js

+ 7 - 2
tripal_fields_layout/theme/js/tripal_fields_layout.js

@@ -30,7 +30,12 @@
     		  var prevObj = $(id).prev().attr('class');
     		  // Highlight the panel if it's already at the top
     		  if (prevObj.indexOf('tripal_panel-base_panel') == 0 && $(id).css('display') == 'block') {
-    			$(id).effect('highlight', {color: '#DDDEEE'});
+    		    var color = $(id).css('background-color') ? $(id).css('background-color') : '#FFFFFF';
+                    if (jQuery.ui) {
+                      $(id).fadeTo(10, 0.5, function() {});
+                      $(id).fadeTo(100, 1, function() {});
+                      //$(id).effect('highlight', {color: '#DDDEEE'});
+                    }
     		  }
     		  // Move the panel
     		  else {
@@ -45,4 +50,4 @@
     },
   };
   
-})(jQuery);
+})(jQuery);