ユーザーがそれぞれのテキストをクリックすると、toasty.png と bready.png の値を返す JavaScript を作成しようとしています。「トースト」と「パン」は返せますが、他のテキストは返せません。何かアドバイス?
<script>
$(document).on('vclick', '.changePageButton', function() {
console.log(this.text);
//console.log(value within the image)
});
</script>
<a class="changePageButton" value="Toast" data-transition="slide">
<input type = "hidden" name = "image" value = "toasty.png">
<input type = "hidden" name = "video" value = "video1.mpg">
test
</a>
<a class="changePageButton" value="bread" data-transition="slide">
<input type = "hidden" name = "image" value = "bready.png">
<input type = "hidden" name = "video" value = "video2.mpg">
test
</a>