happy cat image

Start Web Coding

Your First step toward web coding,
Start Web Coding

change UI


find has the ability to select a tag within a certain tag.
It's hard to say, so let's look at the sauce and understand.


<div class="hello">

In the source above, php html5 css3 is wrapped in a different tag in hello.
Let's select the h4 class using find().
Then we'll just hit the red outline of the h4 class in hello.


    var hello = $('.hello');
    var h4 = hello.find('h4');
    h4.css('border',1px solid red');





In the result above, you can see that only the h4 tag css3 is processed with red outline. The locations are weird due to the influence of Aberdebel's css. Please do not mind.
Then you can use the h4 tag as a selector or why you can think of this one .. When you
practice, you get a moment that you have to use it when you do this.


<!doctype html>
<meta charset="utf-8" />
<title>EVERDEVEL :: jQuery Course</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.0.min.js" ></script>
<script type="text/javascript">
    var hello = $('.hello');
    var h4 = hello.find('h4');
    h4.css('border','1px solid red');
<div class="hello">

강좌로 돌아가기