jquery - manually fire onclick of a textbox passed into parameter -


I have a function that uses a slider when the value of a text box will change. It passes an event variable in which the text box is updated as a value:

  function Update Textbox (e) {$ (e.data.textbox) .val ($ (This) .slider 'option value')); // This line works great $ (e.data.textbox) .change (); // This line works fine in Chrome, but not IE}   

I'm passing (simplified) to bind the function:

 < Code> slinder.bind ('slide', {textbox: '#idOftextbox'}, updatetextbox);   

IE automatically changes the event with only the first line, but then throws an error on the second line "Object does not support this object or method". Although Chrome automatically does not remove the event of change by setting the price, the second line is required. How to get any idea about this without finding a user's agent.

Warning (e.data.textbox.change); // I define the function in all browsers, but that is not like the pair of brackets I

I have also tried eval (e.data.textbox.change) without any luck ...

Just to note, I am happy with the way my slider is working and therefore I am not looking to change it. Just how the event gets into the "bubblade" text box.

That was because I had two incidents, which I had excluded from the question like I It was thought that it was irrelevant.

slider.top ('slide', .... slider.bind ('slidechange', ... < / P>



Comments