<style>
img {
border: 1px solid #ff00ff;
}
</style>
<img src="someImage.jpg" alt="image"/>
Ho can you remove a border of the image element using a jQuery?
Fix it! The answer $("#someImg").css("border","none") is incorrect and does not work ! It is a syntax for choosing element by id. The correct answer will be: $(function() { $("[src='someImage.jpg']").css("border","none"); }); Reference links: https://api.jquery.com/id-selector/ https://api.jquery.com/attribute-equals-selector/ No matter single or double quote sign is used.
2017 Jun 8, 7:27:23 AM
Login in to like
Login in to comment