i m going through some issue with these stuff...
please suggest me the proper way..
suppose we have two arrays
var img1 = ['a','b','c']; var img2 = ['d','e','f'];
and two buttons and a div in our body tag
<input type="button" class="img1" value="COLLECTION 1" /> <input type="button" class="img2" value="COLLECTION 2" /> <div class="myDiv"></div>
i have two button on page with the class name same as my array object name.
so what i want is when i click on any of these buttons ,, it should grab the class name of the clicked button and
append the value of array with the same name.
for e.g. if you click on input button with the class name of 'img1' it should dislpay the
value of array img1 which is 'a b c'.
hope u understand what i really want..
heres the fiddle so far Fiddle
This post has been edited by amit.soni: 22 January 2013 - 03:58 AM