Javascript t、 所以我没有更新它;) $('.target').change(function() { alert('Handler for .change() called.'); }); $('#target').change(function() {
t、 所以我没有更新它;)Javascript t、 所以我没有更新它;) $('.target').change(function() { alert('Handler for .change() called.'); }); $('#target').change(function() { ,javascript,jquery,Javascript,Jquery,t、 所以我没有更新它;) $('.target').change(function() { alert('Handler for .change() called.'); }); $('#target').change(function() { alert('Handler for .change() called.'); }); <form> <select id="target" class="target"> <optio
$('.target').change(function() {
alert('Handler for .change() called.');
});
$('#target').change(function() {
alert('Handler for .change() called.');
});
<form>
<select id="target" class="target">
<option name="pp" value="6">6</option>
<option name="pp" value="12">12</option>
</select>
</form>
$(window).load(function() {
$("img.gall_img").each(function() { // iterate through all img of class gall_img
var imgWidth = $(this).width(); // "$(this)" to access jQuery width() func
var divWidth = $(this).closest('div').width();
//alert(imgWidth + " and " + divWidth); // for debugging
if(imgWidth > divWidth) {
var position = Math.round(-1 * ((imgWidth/2) - (divWidth/2))); //
position = position + "px"; // make position format "123px".
$(this).css("left", position); // "$(this)" to access jQuery css() func
}
});
});
$("#target").change(function() {
alert('Handler for .change() called.');
});
$(document).ready(function () {
$('#target').change(function() {
alert('Handler for .change() called.');
});
});
$(window).load(function () {
//whatever code is already here
$('.target').change(function() {
alert('Handler for .change() called.');
});
}); //end of $(window).load function