Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.a2paragraph .image img').each(function() {
- var img = $('.a2paragraph .image img');
- var h = document.getElementById('img').height(),
- w = document.getElementById('img').width();
- if (h > w) {
- img.parent().css('height', w);
- }
- else if (w < h) {
- img.parent().css('width', h);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment