如果我有一箱带有图像的集装箱......
<div id="container">
<img src="myimage.jpg">
</div>
我如何使用this?
$(document).ready(function(){
$("#container").click(function(){
$(this:image).fadeOut(function() { $(this).remove();});
});
如果我有一箱带有图像的集装箱......
<div id="container">
<img src="myimage.jpg">
</div>
我如何使用this?
$(document).ready(function(){
$("#container").click(function(){
$(this:image).fadeOut(function() { $(this).remove();});
});
因为this
如果你只想直接的孩子,你就不得不将它变成一个 j子,然后使用<条码>限制的<>条/条码>(或<条码>儿童<>条/条码>查询。 或者,作为选择人的背景(起点)提供。
$(document).ready(function(){
$("#container").click(function(){
$(this).find( img ).fadeOut(function() { $(this).remove();});
});
});
或
$(document).ready(function(){
$("#container").click(function(){
$( img ,this).fadeOut(function() { $(this).remove();});
});
});
请注意,这只会抹去图像。 如果你想去掉整个数字四舍五入,你就不得不在内部储存提及该词,并在估计的回击中加以使用。
$(document).ready(function(){
$("#container").click(function(){
var $container = $(this);
$container.find( img ).fadeOut(function() { $container.remove();});
});
});
使用(“mg”)美元,即:
$(document).ready(function(){
$("#container").click(function(){
$("img",this).fadeOut(function() { $(this).remove();});
});
});
在您的“研究”中将“研究”作为第二段
$(document).ready(function(){
$("#container").click(function(){
$( img ,this).fadeOut(function() { $(this).remove();});
});
用美元计算。
$(document).ready(function(){
$("#container").click(function(){
$(this).find("img").fadeOut(function() { $(this).remove();});
});
您可以使用第二个参数来说明背景(内部询问的内容)。
而不是:
$(this:image)
使用:
$( img , $(this))
这将选择所有<代码>img。 页: 1
我认为你应该这样做:
$(document).ready(function(){
$("#container").click(function(){
$(this).children( image ).fadeOut(function() { $(this).remove();});
});
你可以做些什么。
$("img", this).fadeOut(...)
The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.
I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...
Ok, I m stumped. Basically, this script works fine in FF, but not in IE (6,7 or 8) - in which it returns an "Object doesn t support this property or method" error. Any ideas?: function ...
What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...