Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="item-image">
- <div class="plus-wrapper">
- <div class="plus"></div>
- <img src="source_to_image" alt="">
- </div>
- </div>
- var image = $('.plus-wrapper img');
- image.each(function () {
- var that = $(this);
- if (that.width() < 250) {
- that.next('.plus').css('right', '41px');
- }
- });
- $(window).load(function(){
- var image = $('.plus-wrapper img');
- image.each(function () {
- var that = $(this);
- if (this.width < 250) {
- that.prev().css('right', '41px');
- }
- });
- });
- var image = $('.plus-wrapper img');
- image.each(function () {
- if ($(this).width() < 250) {
- $(this).siblings('.plus').css({'right' : '41px'});
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement