html - jQuery difference between FF and Chrome -


he guys, why code work on chrome, not on ff?

the alert below blank in fx gives me rgb color in chrome

jquery.each(menuids, function(index, value) {          var allclass = jquery('#'+value).attr('class');         if( (allclass.split('current-menu-item')).length > 1){                 var currenturl = window.location.href;                 var allhtml = jquery('#'+value).html();                 var allhtml_arr = allhtml.split('href="');                  var allhtml_arr1 = allhtml_arr[1].split('">');                  if( allhtml_arr1[0] == currenturl ) {                     var allclass_arr = allclass.split(value);                     var current_colorcls = jquery.trim(allclass_arr[1]);                     jquery('ul#primary-menu').addclass(current_colorcls);                      var prop = jquery('ul.'+current_colorcls).css('border-top');                     var prop_arr = prop.split('solid');                     var current_colorcode = jquery.trim(prop_arr[1]);                     alert(current_colorcode);                     jquery('.crg-theme-color').css('color',current_colorcode);                     jquery('.site-info').css('border-top', '3px solid '+ current_colorcode);                 }             }     }); 

thanks!

seems there issue in fx-jquery shorthand. border-color still short. can color using full name:

var prop = jquery('ul.'+current_colorcls).css('bordertopcolor'); 

example

console.log(jquery('ul.atlantis').css("bordertopcolor")) 

gives me "rgb(167, 204, 61)"

ps: list of classes can in newer browsers

$(element)[0].classlist 

there shim older browsers here


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -