Jquery css border radius specific corners radius?
Hello I am trying to change the border-radius of specific corners of some uls with jquery sortable on the method sort.
Here is my code so far and it is not working, any ideas?
sort: function() {
var borderSet = $('#fluidWrap ul:last-child').attr('id');
if (borderSet == 'sideWrap') {
$('#sideWrap ul').css({BorderTopRightRadius: 10, BorderBottomRightRadius: 10});
}
else {
$('#sideWrap ul').css({BorderTopLeftRadius: 10, BorderBottomLeftRadius: 10});
}
}
try
.css({'border-top-right-radius': 10})
You could use:
border-radius: 0px 10px 0px 0px;
which is:
border-radius: [top-left],[top-right],[bottom-right],[bottom-left];
This tool is very good for css3: css3generator.com
It may be more helpful to try using the jQuery corner plugin as it will also account for browser differences in border radius definitions.
this should work
css({BorderTopRightRadius: '10px', BorderBottomRightRadius: '10px'})
精彩评论