php - Load a Div from another page into another pages Div -


i'm trying this:

load content of div on page

but doesnt work me. , i'm not sure why.

what im wanting is, have mobile site im working with, , want pull story content data thats on main sites div, , place on mobile sites content div way dont have edit anything. whatever gets published on main gets reflected on mobile.

any ideas best way accomplish this? there way include in php or html takes targeted divs content , not else?

if i'm reading correctly, need:

$('#result').load('ajax/test.html #container'); 

this load page ajax/test.html, grab content of element id "container" , load current pages' element id "result".

more info can found @ http://api.jquery.com/load/

edit: working code based on test files:

<html>     <head>         <script src="http://code.jquery.com/jquery-git.js"></script>         <script>         $(document).ready(function(){             $('#result').load('pull4m.shtml #hello');         });         </script>     </head>     <body>         <div id="result"></div>     </body> </html> 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -