jqte: binding event to associated input element

455 Views Asked by At

I'm wrapping jqte inside an object,

com.comapany.app.domElement.RtfEditor = function(inputElementId) {

    // I've also tried .bind('click', function() {}
    $('#'+inputElementId).bind('click', null, function() {
        alert('binding under construction');
    });
    
    $('#'+inputElementId).jqte();
};

I'm creating an instance of this in another JS file like this

jqEditor = new com.comapany.app.domElement.RtfEditor('testEditor');

Problems, I'm facing:
I am able to either create a jquery text editor using jqte or bind click (or any) event, but not both at the same time. Please help!

0

There are 0 best solutions below