Add class to image
prestarocket opened this issue · comments
Hello,
firsr thx for your plugin...
How can i add a class to the image ?
EX :
'
<figure class="responsive" data-media="assets/images/small.png" data-media440="assets/images/medium.png" data-media600="assets/images/large.png" title="A Half Brained Idea">
<img src="assets/images/large.png" alt="A Half Brained Idea" class="myclass">
</figure>
You can't directly add a class to the image directly, but you can add it to the parent figure:
<figure class="responsive my_class">
<img>
</figure>
And select it like this:
$('.my_class img');
And this:
.my_class img{}
i would like to add the class in the img tag...
ok it fine i could do my job with your selector.
thx
Why straight to the image tag?
in order to use an another plugin but it s fine, i ll use your idea ('.class img')