- Apr 5, 2002
- 2,617
- 99
- 91
I have the following asp:Image
<asp:Image ID="Image2" runat="server" Height="90px" ImageUrl="~/Content/Images/Field_of_Dreams_4.jpg"/>
<div id="main"></div>
and my script is:
<script>
var getMain = $("#main");
var mainWidth = getMain.outerWidth(true) + 1;
$("#Image2").css( "width", mainWidth)
</script>
This script allows me to size the width of the image to the width of the <div id="main">
but if I resize the window the main gets resizes but the picture stays the same.
I would like the picture to resize on the fly without having to hit the refresh button.
Thanks!
<asp:Image ID="Image2" runat="server" Height="90px" ImageUrl="~/Content/Images/Field_of_Dreams_4.jpg"/>
<div id="main"></div>
and my script is:
<script>
var getMain = $("#main");
var mainWidth = getMain.outerWidth(true) + 1;
$("#Image2").css( "width", mainWidth)
</script>
This script allows me to size the width of the image to the width of the <div id="main">
but if I resize the window the main gets resizes but the picture stays the same.
I would like the picture to resize on the fly without having to hit the refresh button.
Thanks!
