The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Get $(this) tab clicked in jQuery UI Tabs widget

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #167387

    i want to get the li tab clicked of the jQuery tabs Widget. For example if i click on the second tab, i want to get the width and offset of that specific tab clicked. I tried this but nothing :P. And is there a way i could get the active tab, but based on the active slide? for example if the third slide is active, i want to add a class to the 3rd tab but not because it was clicked, but because its specified slide is active.

        event: "click",
        hide: "slideUp",
        show: "slideDown",
        active : 0,

    A example would be useful but from a quick glance you aren’t actually selecting am individual entry so $this won’t work.

    Then again, my JS/JQ skills are poor.


    You have to hook into the activate event to achieve what you want, the activate event exposes the ui object which holds information about the selected tab and the previous tab,

    You can also get information about the currently selected tab index requesting the active option

    heres a pen

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.