Consider the following code snippet:

    img {
        border: 1px solid #ff00ff;
<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: No matter single or double quote sign is used.

2017 Jun 8, 7:27:23 AM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes