jQuery jqtransform同一页面上的多种形式的z-index? [英] jQuery jqtransform multiple forms on same page z-index?

查看:91
本文介绍了jQuery jqtransform同一页面上的多种形式的z-index?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://auteli.com/login.php

登录:Autelek 通过:Autelek123

login: Autelek pass: Autelek123

转到我的地理应用"

现在我有几个下拉菜单,并且z索引有问题,这些下拉菜单相互隐藏.我已经尝试了z-index!important,使用javascript更改了z-index,但还是一无所获.我相信这是多种形式.

Now i have a couple of dropdown menus and a problem with the z-index, the dropdowns are hiding each other. I've tried z-index !important, change the z-index with javascript but still nothing. I believe it's the having multiple forms.

推荐答案

当我单击添加"(可用区域)时,其他组合尝试重新加载,但失败.

When I clicked in Add (Available Areas), others combos had try to reload, but they fail.

如果要重新加载这些组合,则需要在其之前重置选择容器的样式和内容(div容器->删除类jqTransformSelectWrapper并删除两个子项,然后再选择其自身).

If you want reload these combos, you need to reset select container style and contents before it (div container -> remove class jqTransformSelectWrapper and delete the two childs before select it self).

我为jqTransform制作了一个函数.像这样:

I've made a function for jqTransform. Something like this:

$.fn.jqTransSelectReset = function () {
    this.each(function () {
        var item = $(this);
        if (item.hasClass('jqTransformHidden')) {
            item.removeClass('jqTransformHidden');
            $(item.parent().get(0)).removeAttr('style');
            $(item.parent().get(0)).removeAttr('class');
            $(item.parent().get(0, 'children').firstChild).remove(); // div
            $(item.parent().get(0, 'children').firstChild).remove(); // ul
        }
    });
    // this class is just a flag - remove it
    $('select').removeClass('jqTransformHidden');
    // re-run the transformation in all selects
    return $('select').jqTransSelect();
};

然后,加载组合框并按如下所示调用函数jqTransSelectReset:

Then you load your combobox and call the function jqTransSelectReset like this:

$('#yourSelectToRefresh').load(...); // fake method to load combobox
$('select').jqTransSelectReset();

希望有帮助!

最好的问候.

请记住:如果有帮助,请投票! =)

Remember: if it helps you, vote up! =)

这篇关于jQuery jqtransform同一页面上的多种形式的z-index?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆