Hola gente, tengo la siguiente funcion ajax en jquery:
Código Javascript
:
Ver original$(document).ready(function() {
var idLea = 'NBA';
$.ajax({
url: "../livescore.php",
type: "GET",
data: {"idLeague":idLea},
success: function(response) {
$('#scoreBar').empty();
$('#scoreBar').append(response);
console.log(response);
}
});
});
La respuesta ajax me llega bien desde el php, esto es lo que se ve en la consola al dar el console.log:
Cita: <div class="scoreWrapper">
<div class="menu">
<a><span class="mainSports">Sport </span><span class="moreSports">MORE SPORTS <img src="img/arrowMoreSports.png" alt="more sports"></span><span class="mainSportsMobile">SPORT</span></a>
<div class="moreSportsMenu">
<ul>
<li><a id="NBA">NBA</a></li><li><a id="NCAABasketball">NCAA Basketball</a></li><li><a id="NHL">NHL</a></li><li><a id="Golf">Golf</a></li><li><a id="Soccer">Soccer</a></li> </ul>
</div>
</div>
<div class="arrowLeft"><a class="prev"><img src="img/arrow-left.png" alt="left score"></a></div>
<div class="scores">
<div id="owl" class="owl-carousel owl-theme">
<table class="item sporTitle NBA"><tr><td>NBA</td></tr></table><table class="item empty NBA" title="Indiana at Miami"><tr><td>IND @ MIA</td></tr><tr><td>TUE, 04:05 PM PST</td></tr></table><table class="item empty NBA" title="Cleveland at New York"><tr><td>CLE @ NY</td></tr><tr><td>TUE, 04:05 PM PST</td></tr></table><table class="item empty NBA" title="Toronto at San Antonio"><tr><td>TOR @ SA</td></tr><tr><td>TUE, 04:05 PM PST</td></tr></table><table class="item empty NBA" title="Detroit at Minnesota"><tr><td>DET @ MIN</td></tr><tr><td>TUE, 04:35 PM PST</td></tr></table><table class="item empty NBA" title="Brooklyn at Boston"><tr><td>BRK @ BOS</td></tr><tr><td>TUE, 04:35 PM PST</td></tr></table><table class="item empty NBA" title="Atlanta at Oklahoma City"><tr><td>ATL @ OKC</td></tr><tr><td>TUE, 04:35 PM PST</td></tr></table><table class="item empty NBA" title="Chicago at Milwaukee"><tr><td>CHI @ MIL</td></tr><tr><td>TUE, 05:05 PM PST</td></tr></table><table class="item empty NBA" title="LA Lakers at Phoenix"><tr><td>LAL @ PHO</td></tr><tr><td>TUE, 07:35 PM PST</td></tr></table>
</div>
</div>
<div class="arrowRight"><a class="next" ><img src="img/arrow-right.png" alt="left score"></a></div>
<div class="fullScores"><a href="sportbook.php"><span class="fullLink">Full Scoreboard</span><span class="fullScoresMobile">All</span></a></div>
</div>
Entonces al hacer el append deberia cargarme en el div correspondiente los datos devueltos osea html pero no lo esta haciendo. Alguna ayuda al respecto ??