Reputation: 9301
I'm using jQuery to remove the last bottom-border inside a div like this:
$(document).ready(function(){
$("#containerNewBuildings border-bottom:last").css("border-bottom", "none")
});
But for some unknown reason it's not working. Have I done something wrong in the code?
Upvotes: 0
Views: 2789
Reputation: 1514
Selectors are only for DOM elements not for CSS attributes. Do this instead:
$(document).ready(function(){
$("#containerNewBuildings").css("border-bottom", "none");
});
EDIT: "Yes, but I'm using several bottom-borders below some menu options, but it's just the last one I want to remove"
Answer:
$(".myContainerOfMenuOptions").children().last().css("border-bottom", "none");
Upvotes: 3
Reputation: 8067
if you only want the last #containerNewBuilding to have no border bottom you're looking for
$(document).ready(function(){
$("#containerNewBuildings:last").css("border-bottom", "none");
});
Upvotes: 1
Reputation: 8726
modify your selector
form $("#containerNewBuildings border-bottom:last") to $("#containerNewBuildingst")
Upvotes: 0