开发者

adding class in jQuery not working in IE9

开发者 https://www.devze.com 2023-04-07 03:59 出处:网络
I am working on a menu for a 开发者_JAVA技巧WordPress theme. I am trying to style the menu such that on hover, menu items that don\'t have a submenu look one way, and menu items that DO have a submenu

I am working on a menu for a 开发者_JAVA技巧WordPress theme. I am trying to style the menu such that on hover, menu items that don't have a submenu look one way, and menu items that DO have a submenu look a different way. I have the following jQuery

$(document).ready(function(){
    $('.menu li').has('ul').addClass('submenu');
});

And I have styled this in my CSS file. Main menu items on hover get 4 rounded borders and main menu items on hover that have a submenu get only the upper rounded borders. This works great in Firefox, Chrome and Safari but not in IE9. Anyone have any ideas how to get this jQuery function to be accepted by IE9? The WordPress theme in progress is at WordPress theme


border-top-left-radius: 10px 10px 0 0;

That is the offending line. You only want border-radius, since that's what you put for the -moz-, -webkit- and other prefixes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号