<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Tiêu đề</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<style>
span {
    color:red;
    display:none;
}
</style>
<script>
$(function(){
    $('.target').select(function(){
        $("span").css("display", "inline").fadeOut("slow");
    });
	
    $('button').click(function(){
        $('.target').select()
    })
});
</script>
</head>

<body>
<div class="target">Thành phần div <span>selecting</span></div>
<br />
<button>Click để kích hoạt sự kiện select</button>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.