1

I using jquery tabs, and it's working fine.

I also want to add a button to edit the label of the tab, but jquery don't listening the clic on my button, like a z-index problem. I put a "z-index: 10000;" on the button, but it don't work, i just changing of tab.

My tab :

<li><a href="#tab1"><span style="z-index: 100000;" class="button 
   editLibelleCategorie"></span>
   <br>Tabs 1</a>
</li>

and my js code :

$(document).on('click', '.editLibelleCategorie', function()
{
    alert('ok');
    $("#modalEditCategorie").modal('show');

});

Alert is not display when I click on button ...

Thank for your help !

4 Answers 4

1

Try the solution as below.

$('.editLibelleCategorie').on('click', function()
{
    alert('ok');
    $("#modalEditCategorie").modal('show');

});
Sign up to request clarification or add additional context in comments.

Comments

1

Instead of using document mention Your class name for the button in Jquery as follows

$('.editLibelleCategorie').on('click', function()
{
    alert('ok');
    $("#modalEditCategorie").modal('show');

});

Comments

0

A click on the active tab to rename it:

$tabs.on('mouseup', '.ui-tabs-active a', function(e){
    e.preventDefault();
    if (e.which === 1)
        Dialog.renameTab($(this))
});

Comments

0

Try this. http://jsfiddle.net/6t6yzffa/

$("#tabs").tabs({
    activate: function (event, ui) {}
});


$('#tabs').on('tabsbeforeactivate', function (event, ui){
    alert('The current tab');
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.