Monday 15 February 2010

using Jquery.load() with javascript content -


I am trying to capture objects, I am organized with javascript, and have put them on the content of my page . The issue I am arriving on is that when I use .load () , it does not capture any javascript, so the picture I capture is in the right organization is not.

Here is the function that I use to get the content:

  function loader (url) {$ .get (url, function) { $ ('# Posts') .FadeOut ('normal' (Function) () {$ ('# posts'). Html (data);}); $ ('# posts'). FadeIn ('normal'); }). Error (function (url) {alert ('error');}); };   

After researching, it seems that I need to use Ajax to get Javascript

Here's the thing:

I have the exact same JavaScript code on my page which is Javascript for the second page which is not applicable, is there any way that I .load ()

Can I apply this javascript on items loaded with

Masonry is required when you add or remove elements, then you tell it so that it can reconcile itself accordingly. $ Wall destroy the masonry, wall Change the HTML, build masonry on $ wall

  • Use masonry to destroy $ $ wall children, Use masonry to add new children to $ wall - < / Li>

    after the first example, by me There are some changes made.

    from ID = "entry" to class = "entry" , and #entry .entry . One objective can only be used by one element at a time, while for this purpose there is a class.

    Returned Adding HTML to #posts to the HTML we have to do with & lt; html & gt; ... & lt; head & gt; ... & lt; / head & gt; & lt; body & gt; .. .

      $ newPosts = $ (data) .filter (function () {return.id === 'post';}). (;);   

    destroyed masonry, html, reloaded masonry update $ wall.masonry ('destroyed'); $ ('#posts') HTML ($ newPosts). $ Wall.masonry ({item selector: '.entry, .entry_photo', is unauthorized: incorrect});

  • No comments:

    Post a Comment