26 EKİM 2009, PAZARTESİ
Seçme jQuery ile Yorum HTML
Herhangi bir jquery ile html yorumlarını seçmek için nasıl biliyor mu?
<html>
<head>
<title>Check Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("body *").each(function() {
alert($(this).wrap("<span />").parent().html());
});
});
</script>
</head>
<body>
<!-- Hello -->
<p>
<label for="thing">Thing Label</label>
<input id="thing" type="checkbox" />
</p>
Bu yoruma cevap vermez
CEVAP
8 EYLÜL 2010, ÇARŞAMBA
Bu bir şey aradığınızı eşdeğer gibi görünüyor:
$(function() {
$("body").contents().filter(function(){
return this.nodeType == 8;
}).each(function(i, e){
alert(e.nodeValue);
});
});
Bunu PaylaÅŸ:

Kullanarak jQuery UI otomatik tamamlam...
AngularJS HTML işleme tamamlandıktan s...
Oyun/HTML 5 video JQuery kullanarak pa...
Nasıl çapa jQuery veya Javascript kull...
Metin seçme seçeneği jQuery ile içerik...