जब आप एक चेकबॉक्स पर क्लिक करते हैं तो मैं चाहता हूं कि संदेश धीरे-धीरे फीका हो।jquery fadeIn() .html() के साथ काम क्यों नहीं करता है?
क्यों नहीं .fadeIn() इस उदाहरण में काम नहीं करता है?
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>Text XHTML Page</title>
<link href="css/main.css" rel="stylesheet" type="text/css" media="all"/>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="javascript/main.js"></script>
</head>
<body>
<div class="checkboxList">
<div class="title">Languages:</div>
<div class="row"><input class="checkbox" type="checkbox"/><span class="label">Ruby</span></div>
<div class="row"><input type="checkbox"/><span class="label">PHP</span></div>
<div class="row"><input type="checkbox"/><span class="label">C#</span></div>
<div class="row"><input type="checkbox"/><span class="label">Python</span></div>
<div class="row"><input type="checkbox"/><span class="label">JavaScript</span></div>
</div>
<p id="message"></p>
</body>
</html>
जावास्क्रिप्ट:
google.load("jquery", "1.3.2");
//run when page is loaded
google.setOnLoadCallback(function() {
$('.checkboxList .row').css('color','red');
$('.checkboxList input').attr('checked', true);
$('.checkboxList input').bind('click', function() {
$('#message').html("You clicked on a checkbox.").fadeIn('slow');
});
});
बिल्कुल सही, बस मुझे जो चाहिए था। – Phil
बहुत बढ़िया। आप आज के नायक हैं। –
एक इंसान के रूप में एक सामग्री प्रबंधन प्रणाली - भयानक! – JoseBazBaz