1

In my app I have 3 tabs. I need to run a piece of javascript when one of the tabs is clicked but I only want to run it one time; not for every click of the tab.

Or if I could run this once the app has finished loading (this code is dependent on jQuery being loaded) how would I go about doing that?

Code I need to run:

$('.sortable').sortable();
    $('.handles').sortable({
        handle: 'span'
    });

    Ember.$('.connected').sortable({
        connectWith: '.connected'
    });

    $('.exclude').sortable({
        items: ':not(.disabled)'
    });

    $('.sortable').sortable().bind('sortupdate', function () {
        console.log('SORT UPDATE...');
    });
Mithrilhall
  • 1,485
  • 8
  • 33
  • 52

0 Answers0