Is there anyway to append some html content from a file in Jquery?
I know you can use load() in jquery to replace the entire content within an element.
but I wonder if I can conditionally use append('url') to add extra content into an element in Jquery
You could try this:
$.get('/someurl', function(result) {
$('#someElement').append(result);
});
So you are trying to append dynamic content? Try something like this:
$(document).ready(function(){
$.get('<URL>', function(data){
$(<contentelement>).append(<either entire data element, or do some operations on it>);
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With