Home > Web Front-end > JS Tutorial > Detailed explanation of easyui getting the currently selected tabs instance

Detailed explanation of easyui getting the currently selected tabs instance

零下一度
Release: 2017-06-25 09:56:08
Original
2518 people have browsed it

$("#" + $("#tabs").find("iframe")[$(".tabs-header ul li").index($('.tabs-selected')) - 1 ].id).contents().find(".search_button").click();

This code gets the tabs currently selected by easyui and triggers the click event of class ".search_button"

$("#tabs").find("iframe")

tabs is the ID of easyui, and tabs load iframe on HTML, so the above code is Get all currently opened tabs

(Every time a tab is opened, there will be one more iframe in the HTML. Similarly, every time a tab is closed, there will be one less iframe in the HTML, dynamically loaded)

$(".tabs-header ul li").index($('.tabs-selected'))

is the index of the currently displayed tabs,

Note : The order of tabs displayed on the page is consistent with the order of iframes on HTML. However, because there is a homepage, the index will be 1 more than the iframe serial number, so it must be reduced by 1

$("# tabs").find("iframe")[$(".tabs-header ul li").index($('.tabs-selected')) - 1]

This way you can get the current The iframe node HTML

of the displayed tabs

The above is the detailed content of Detailed explanation of easyui getting the currently selected tabs instance. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template