0

Make iframe automatically adjust height according to the contents without using scrollbar?

jquery code [code language=”jquery”] <script language="javascript" type="text/javascript"> function resizeIframe(obj) { obj.style.height = obj.contentWindow.document.body.scrollHeight + ‘px’; } </script> [/code]

0

jQuery animate() Right to Left on .hover

HTML <div id=”parent”> <a href=”#”>Hover here</a> </div> CSS #parent { width:200px; } JQUERY $(‘#parent’).hover(function(){ var a =  $(this).find(‘a’).first(); a.css(‘position’, ‘relative’).animate({ left: $(this).width() – a.width() }); },function(){ $(this).find(‘a’).first().animate({ left:0 }); }); LIVE DEMO:http://jsfiddle.net/6cAYv/102/