Pages 1
You must login or register to post a reply
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
816
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Deprecated: Function create_function() is deprecated in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
811
Warning: count(): Parameter must be an array or an object that implements Countable in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
814
- From: Klaipėda
- Registered: 2006-10-31
- Posts: 432
Topic: jQuery UI Dialog Responsive
Jei kam reikės jQuery UI Dialog Responsive.
Kažkada radau stackoverflow duotą funkciją, bet su nauja jQuery UI versija neveikė, dabartinė tikrai veikia nuo 1.10.x+ versijos.
$(window).resize(function () {
fluidDialog();
});
$(document).on("dialogopen", ".ui-dialog", function (event, ui) {
fluidDialog();
});
function fluidDialog() {
var $visible = $(".ui-dialog");
$visible.each(function () {
var $this = $(this);
var dialog = $this.find(".ui-dialog-content").data("ui-dialog");
if (dialog.options.fluid) {
var wWidth = $(window).width();
if (wWidth < dialog.options.maxWidth + 50) {
$this.css("max-width", "90%");
}
else {
$this.css('width',dialog.options.maxWidth);
$this.css("max-width", dialog.options.maxWidth);
}
dialog.option("position", dialog.options.position);
}
});
}
Kaip naudoti:
$("#dialog").dialog({
maxWidth: 500,
width: 'auto',
fluid: true,
});
Atsirado naujas parametras fluid. Jeigu dialogas telpa į langą, naudojamas maxWidth, kitu atveju automatiškai mažinamas langas.
Tikiuso kam nors pravers.
Pages 1
You must login or register to post a reply