Get the value of the chosen data-class and write to a label ?
hi guys
I have a group of 10 images which have the following data class below
How do i get the value of the selected data-class and write it to a label ?
thanks
Ehi
- $(".classify").click(function () {
- $('#filter').text('You have chosen a filter'+data("class").val); // #filter is the name of the label to be written
- // below is my image src
- <img id="Image1" class=classify data-class="blur"
- style="width:50px; height:50px;"
- title="Original"
- alt="thumb image">
- e.g the code above should write
- You have chosen a filter blur