Monday 15 July 2013

javascript - After running an AJAX call, jquery code does not execute -


I have a website that uses pagination on page and some filtering with jQuery and AJAX. As long as I do not change my links with Javascript links, do all the good work

Being on the homepage and doing all the required work due to no filtering or pointing to my javascript links Now do not work anymore.

Javascript for this link is:

  $ (function () ($ (".artikel_box_lk .button"). Click (function (e) {window. Open ("/ lk /" + $ (this) .attr ("rel"), "_blank");});});   

and code for pagination :

  function load data (page) {loading_show (); $ .ajax ({type: "post", url: "php / load_data.php", data: datatused, success: function ( Msg) {$ ("# Container"). AjaxComplete (Function (Event, Request, Settings) {Loading_hide (); $ ("# Container") .HTML (msg);})}}})}}   

My guess is that javascript The pt is not reloaded on the AJAX call because only the part of the page is reloaded, but I'm sure this is the case and how it is decided.

< Div class = "post-text" itemprop = "text">

Looks like your Javascript has not been loaded after postback. Page loads on webpage Try adding your function inside:

  function page load () {$ (".artikel_box_lk .button"). Click (function (e) {window.open ("/ lk /" + $ (this) .attr ("rel"), "_blank");}) }    

No comments:

Post a Comment