Not sure why, but with the following Html
<div id="basket" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Basket</h3>
</div>
<div class="panel-body">
<div id="row-031d9f2b-c6e9-e311-827b-c8bcc8ef428f" class="row">
<div class="col-xs-8"><span id="qty-031d9f2b-c6e9-e311-827b-c8bcc8ef428f">5</span> <small>x</small> Match Night Ticket [Adult]</div>
<div class="col-xs-2 text-right">16.00</div>
<div class="col-xs-2"><a name="removeFromBasket" href="javascript:;" data-pid="031d9f2b-c6e9-e311-827b-c8bcc8ef428f"><span class="glyphicon glyphicon-remove text-danger"></span></a></div>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-8"><strong>Total</strong></div>
<div id="basket-total" class="col-xs-4">80.00</div>
</div>
</div>
</div>
I cannot get the value of the span with the id qty-031d9f2b-c6e9-e311-827b-c8bcc8ef428f
I'm using the following javascript which returns an empty string. I'm sure I am missing something obvious but after looking at it for an hour or so and trying umpteen variations, I cannot see where I am going wrong.
var qtyId = "qty-" + pid;
//var productRowId = "#row-" + pid;
alert($("#basket .panel-body " + qtyId).text());
pid in the script above equals the guid value 031d9f2b-c6e9-e311-827b-c8bcc8ef428f
#, I.E.#qty-031d9f2b-c6e9-e311-827b-c8bcc8ef428f.