Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dom traversal jquery

$(function() {
    var e = $("p").parent();
    e.css("border", "2px solid red");
});
<!--HTML------------------------
//Selects a parent element of the paragraph and sets a red border for it
<div> div element
  <p>paragraph</p> 
</div>
---->
Source by www.sololearn.com #
 
PREVIOUS NEXT
Tagged: #dom #traversal #jquery
ADD COMMENT
Topic
Name
5+5 =