dimanche 10 juillet 2016

js Jquery .text() doesn't work


i've got this js-code:

    $(".dpst_item").click(function(){
            var dpst_id = this.id;
            var text = $('img.'+dpst_id+' span.dpst_item_span').text();
            alert(text);
    }):

And this php-code:

echo '<div class="dpst_item_div"><img id="' . $item_classid . '" class="dpst_item" class="dpst_item-select" src="https://steamcommunity-a.akamaihd.net/economy/image/class/730/' . $item_classid . '/102fx102f" title="' . $item_name . '" ><span id="' . $item_classid . '_price" class="dpst_item_span" style="cursor:pointer">'.$item_price.'$</span></div>';

But i dont get anything at alterted.


Aucun commentaire:

Enregistrer un commentaire