Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove or hide style on element

Tags:

jquery

I want to remove the last right border in a row of links?

#mainMenu a {
display: block;
float: left;
height: 20px;
padding: 0px 10px 2px 10px;
border-right: 1px solid #cfcfcf;
font-size: 16px;
font-weight: bold;
font-family: arial, verdana, 'sans-serif';
color: #CFCFCF;
}

I have tested to change the color of the border to the same color as the background, but it's not working and I'm looking for some help. Perhaps there is a better way?

$("a#mainMenu:last").css({border-right: '1px solid #ffffff'});
like image 867
3D-kreativ Avatar asked May 10 '26 02:05

3D-kreativ


1 Answers

CSS and selector shown are reverse from each other, this should be correct to find last A assuming a single level menu

  $("#mainMenu a:last").css("border-right", "none")
like image 163
charlietfl Avatar answered May 11 '26 20:05

charlietfl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!