i need to pull a small string from a diffrent site from a div with the class 'entry' (theres only one div with that class and the div doesnt have an id). I learned about this plugin http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/ But i somehow did not manage to install nor use the code to make it work. I tried nothing but the code on the plugin page. Where/How do i need to install the plugin? Where/How to implement the given code correctly? Maybe a working fiddle sample would help :)
EDIT: I used this code
<script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
<script src="https://raw.githubusercontent.com/padolsey-archive/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery.ajax({
url: 'http://news.bbc.co.uk',
type: 'GET',
success: function(res) {
var headline = jQuery(res.responseText).find('a.tsh').text();
alert(headline);
}
});
});
</script>
And i use phase5 HTML editor, so theres no error thrown, any recommandation for a different editor? The code just doesnt produce any result, the page loads and functions as normal but no alert is shown.