The returned data is marketlivedata(...)
. This is calling the marketlivedata
function, which is not defined in your script. Since, you've used dataType as jsonp
, the function is executed.
To solve this you can change the data format from the JSON server(which might not be possible as this looks like third party service) or you can define a function of that name which will be called when the response has arrived.
function getUserData() {
$.ajax({
type: "GET",
url: "http://mobilelivefeeds.indiatimes.com/homepagedatanew.json",
dataType: 'jsonp',
crossDomain: true,
success: function(data) {
// $('#ajexLoaderSec').hide();
console.log(data);
},
error: function(e) {
console.log(e);
}
});
};
getUserData();
function marketlivedata(data) {
console.log(data);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…