Tab issue when dissabling them

Tab issue when dissabling them

Hi Everyone,

I am having a issue when I disable certain tabs.  My website has 6 tabs, the first tab is the login tab.  When the website comes up, I disable all tabs, except the first one:

$( "#Main" ).tabs( { disabled: [1, 2, 3, 4, 5] } );    <------ this is the line

Then, I have a JavaScript, that detects when a tab has been clicked:

$(function() {//Open function
$("#Main").tabs();
$('[id^=ui-id-]').click(function(){ //Open [id^=ui-id-]

var tabId = $(this).attr('id');

        //Home
        if (tabId == 'ui-id-1')

         {

            do something

        }

My issue with all this is that, if all the tabs are disabled, why should the JavaScript even activate(get triggered)?

Unfortunately for me, it does, so is this normal?  Is there a way to block, stop, this behavior?


Thanks.