Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic UI Callback for tabs

I am referring this document: http://semantic-ui.com/modules/tab.html#/settings

As per the document I should be able to perform callbacks on tab visible. But I am missing some points as a result of which my alert is not coming up.

Here is a working code snippet: http://codepen.io/anon/pen/YXvXKG

My JS

$('.top.menu .item').tab({'onVisible':function(){alert("Called")}});

Appreciate if anybody can help me on this!

like image 252
Cyril Cherian Avatar asked Sep 11 '26 02:09

Cyril Cherian


1 Answers

You are using an outdated version of Semantic UI. The documentation is for a newer version of Semantic. Consider updating to a 2.x version.

Here is a working JSFiddle with your code: https://jsfiddle.net/xn7aref8/1/

This works in newer versions of Semantic.

$('.top.menu .item').tab({'onVisible':function(){alert("Called")}});
like image 80
Franz Payer Avatar answered Sep 13 '26 16:09

Franz Payer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!