讓container的圖片讀取完畢再做動作
$(function() {
$('#container').imagesLoaded(function() {
$('#container').masonry({
itemSelector : '.item',
columnWidth : 10
});
});
});
http://stackoverflow.com/questions/7476649/jquery-masonry-breaksstacks-images-in-chrome-safari-but-only-on-first-load
Hiển thị các bài đăng có nhãn jquery. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn jquery. Hiển thị tất cả bài đăng
Thứ Tư, 15 tháng 5, 2013
Thứ Ba, 13 tháng 11, 2012
jQuery ~ move Table tr
$(document).ready(function(){
$(".up,.down").click(function(){
var row = $(this).parents("tr:first");
if ($(this).is(".up")) {
row.insertBefore(row.prev());
} else {
row.insertAfter(row.next());
}
});
});
reference
http://stackoverflow.com/questions/1569889/jquery-move-table-row
$(".up,.down").click(function(){
var row = $(this).parents("tr:first");
if ($(this).is(".up")) {
row.insertBefore(row.prev());
} else {
row.insertAfter(row.next());
}
});
});
reference
http://stackoverflow.com/questions/1569889/jquery-move-table-row
Thứ Ba, 16 tháng 10, 2012
jQuery ~ Datepicker change language
download js
http://logicss.googlecode.com/svn-history/r41/trunk/media/jquery/jquery.ui.i18n.all.min.js
$.datepicker.setDefaults($.datepicker.regional["zh-TW"])
http://logicss.googlecode.com/svn-history/r41/trunk/media/jquery/jquery.ui.i18n.all.min.js
$.datepicker.setDefaults($.datepicker.regional["zh-TW"])
Thứ Hai, 3 tháng 9, 2012
jQuery ~ move element
$("#source").appendTo("#destination");
reference
http://stackoverflow.com/questions/1279957/how-to-move-an-element-into-another-element
reference
http://stackoverflow.com/questions/1279957/how-to-move-an-element-into-another-element
Chủ Nhật, 19 tháng 8, 2012
解決Discuz和jQuery的衝突~
我是用人家的解決方法1
将jquery.js在common.js之前载入,不然jquery的$()函数会覆盖common.js的$()函数;然后用到jQuery的$()函数的地方都用jQuery()代替。
不過我是用$jq代替= =
var $jq = jQuery;
http://witmax.cn/discuz-jquery-conflict.html
将jquery.js在common.js之前载入,不然jquery的$()函数会覆盖common.js的$()函数;然后用到jQuery的$()函数的地方都用jQuery()代替。
不過我是用$jq代替= =
var $jq = jQuery;
http://witmax.cn/discuz-jquery-conflict.html
Thứ Ba, 3 tháng 7, 2012
jQuery Flot ~ set Label example
var d1 = [];
d1.push([1, 1234]);
d1.push([2, 5678]);
var stack = 0, bars = true, lines = false, steps = false;
$.plot($("#statisticsGraph"), [d1], {
series: {
lines: { show: lines, fill: true },
bars: { show: bars, barWidth: 0.8 }
}, xaxis: {
ticks: [[1, 'out hospital'], [2, 'in hospital']]
}
});reference
http://stackoverflow.com/questions/459947/how-do-i-control-the-tick-label-size-in-flot
Thứ Hai, 2 tháng 7, 2012
jQuery Flot ~ Invalid dimensions for plot
Invalid dimensions for plot, width = 893, height = 0
假如要用jQuery Flot 產生圖表
出現這問題是因為
沒有設定到指定畫圖表物件的高跟寬
加上css設定下就OK~
假如要用jQuery Flot 產生圖表
出現這問題是因為
沒有設定到指定畫圖表物件的高跟寬
加上css設定下就OK~
#statisticsResult{
height:300px;
width:300px;
}
height:300px;
width:300px;
}
Thứ Tư, 14 tháng 9, 2011
jQuery ~ reset form
不能這樣寫....
要這樣寫XD
reference
http://simple.procoding.net/2008/11/22/how-to-reset-form-with-jquery/
$('#form').reset();
要這樣寫XD
$('#form').each(function(){
this.reset();
});
this.reset();
});
reference
http://simple.procoding.net/2008/11/22/how-to-reset-form-with-jquery/
Đăng ký:
Bài đăng (Atom)