如何使用jQuery获取索引 [英] How to get index using jquery

查看:77
本文介绍了如何使用jQuery获取索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,


我正在使用jquery 1.6和ajax tabcontainer.

我想知道当前哪个标签页及其索引值.
我不知道我在想什么.

Hello Friends,


I''m using jquery 1.6 and ajax tabcontainer.

I want to know which tab is focused with it''s currently and its index value.
I don''t know what I''m missing.

$("#tabContainer").click(function () {
        alert("Entered to Tab Container");
        var chld = $("#tabContainer").children("div");
        alert("cht" + chld);

        var idx = $(this).text($("#tabContainer div:selected"));
        alert(idx);

    });



请指导我.


谢谢.



Please guide me.


Thanks.

推荐答案

(" ).click(函数(){ alert(" ); var chld =
("#tabContainer").click(function () { alert("Entered to Tab Container"); var chld =


(" ).children(" ); alert(" + chld); var idx =
("#tabContainer").children("div"); alert("cht" + chld); var idx =


( this ).text(


这篇关于如何使用jQuery获取索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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