selecting content in jquery
hello,
I want to select the contents of a span in jquery.
this is the html:
<a href="?page=home&action=add&id={$film.film_id}"><img src="images/shoppingcartButton.png" id="shoppingButton" alt="shoppingcartButton" title="shoppingcartButton"/><span>{$film.film_id}</span></a>
the jquery i have is:
lalala = ($('#shoppingButton span').text());
alert(lalala);
but the result is empty. anyone know how it should be done?
tyvm