Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert the code what Jquery load
    primarykey
    data
    text
    <p>I use this code, to load a part of my html into an other. Its works well, but i need to modify this code, to replace the loaded source in the "host html file", because if i see my source code after .load() than i did not see the inserted code in.</p> <p>Thank you.</p> <pre><code>var AjaxContent = function(){ var container_div = ''; var content_div = ''; return { getContent : function(url){ $(container_div).animate({opacity:0}, //Turn the opacity to 0 function(){ // the callback, loads the content with ajax $(container_div).load(url+" "+content_div, //only loads the selected portion function(){ $(container_div).animate({opacity:1}); //and finally bring back the opacity back to 1 } ); }); }, ajaxify_links: function(elements){ $(elements).click(function(){ AjaxContent.getContent(this.href); return false; //prevents the link from beign followed }); }, init: function(params){ //sets the initial parameters container_div = params.containerDiv; content_div = params.contentDiv; return this; //returns the object in order to make it chainable } } }(); </code></pre> <p>EDIT:</p> <p>Sorry. So, i dont want to modify the file, but i use Yoxview which is need some class, div, etc..to run. I use host.php which will hold the html snipetts from the submenus. If i directly open my submenu.php than everything works well, but if i use host.php and load the snipett from the submenu.php than it seems to everything is ok, the text and images shown, but my script does not run. If i check the source, than i realized my its not changed the text the divs etc..missing. So i tougth i need to append the code which loaded by jquery .load() Maybee i wrong. Sorry for my poor english.</p> <p>EDIT 2. Maybee this link will help to uderstand my problem:</p> <p><a href="http://demos.malbecmedia.com/ajax-site-demo/" rel="nofollow">http://demos.malbecmedia.com/ajax-site-demo/</a></p> <p>I use this tutorial. If you see the source after hit the link2 u see the #text div content not change in the source. This is my problem. How to modify the code to change the div content in the source too not just the "frontend".</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload