ボタン「new_a_window」をクリックして、ユーザーが画像とボタン(画像が上にあるボタン)を作成できるようにするのでappend()
、jQueryで使用します。しかし問題は、ユーザーがそれを押したときに別の画像を取得する必要があるということです。
ユーザーが「new_a_window」ボタンをクリックすると、jQuery は jDialog(story_pages) に画像を含むボタンを作成します。
$( '#new_a_window').bind('click',function(){
$('#story_pages').append('<div><button value=window_value
style="width:100px; height:100px" >
<img id=window_value src="../pic/white.png" width="100px" height="100px">
</button></div>');
window_value= window_value+1; //I give each of the images a unique integer value since of
// the value is the index of a image array.
})
シナリオを実装する必要があります: