jQuery jqtransform multiple forms on same page z-index?

血红的双手。 提交于 2019-12-25 01:28:45

问题


http://auteli.com/login.php

login: Autelek pass: Autelek123

Go to My Geographical Apps

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.


回答1:


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

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).

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();
};

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

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

Hope it helps!

Best Regards.

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



来源:https://stackoverflow.com/questions/9515161/jquery-jqtransform-multiple-forms-on-same-page-z-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!