When using JQuery's .load
to select a div from another page like
<div id="hello"> Hello </div>
How do i get it to exclude the div tags from the result?
So it just returns "Hello".
To be more specific what I'm actually doing is getting a div with some html in it from a web page and placing it in another.
<script>
$(document).ready(function(){
$('.backup').on('click',function(e){
var id = $(this).attr('id');
var file_name = "../ajax/"+{{ json_encode($data[0]) }} + " #" + id + ".text";
console.log(file_name);
//this is .load it takes in a string with a URL and a DOM element as a string.
// it will take the dom element found at the URL and place it in .page_text
$(".page_text").load(file_name);
});
});
</script>