How to add class to the last selected paragraph element and highlighting it.

 Posted by vishalneeraj-24503 on 2/4/2015 | Category: jQuery Interview questions | Views: 1466 | Points: 40

<!doctype html>

<html lang ="en">
<meta charset="utf-8">
<title>addClass demo</title>
margin: 8px;
font-size: 16px;
color: red;
background: yellow;
<script src="//"></script>
$("p:last").addClass("selected highlight");

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response