Sunday 15 May 2011

jQuery, .net and .on(click) fails after ajax event -


I'm breaking my head over it. For a mobile site on jQuery Mobile , I found some ASPX page some html and ASP control . There is some jQuery in the external file that goes like this:

  $ (window). ('Click', function (warning) (warning 'click on'); // debug // other things}};});  < / Pre> 

It works fine when it loads on this page, it makes some changes on some radio; checkbox button.

The problem occurs when the user ages at the top of this page To change through the medium, any other radio button changes some infos in the page. Then, the radio / checkbox (as #chktlnao ) stops working, even if They remain on the page without any modification.

Top radio button asp: RadioButton s is something within vb code that links to them: & lt ; Asp: asyncPostBackTrigger ControlID = "optPE" EventName = "Check-Changed" />

The .NET part is not handled by me site jQuery 1.8.2 and jQuery Mobile 1.2. 0.

I have already tried many things:

on window.load and document.ready < / Code>:

  $ (document) .on ("click", "#chktlnao", function () {...}); $ ("Body"). ("Click", "#chktlnao", function (event) {...});   

I'm sure I'm missing something with jQuery mobile but it does not look like. I also know that live dislikes, so the solution should be in the method .

This is failing due to some vb.net code and it's a vb based solution instead of javscript Decided to use. Thanks for the help.

No comments:

Post a Comment