jquery - Showing different Size of an Image based on the Width Available -


i have 2 column layout on website has on 100 slides on it. each slide contains image , video on it. slides have video on them , doesn't. since both image , video on same row, share width of slide 50% - 50%.

now, question how can make width of image 100% automatically if there no video on slide. should happen on page load slides loaded simultaneously user slides left or right.

following html:-

<div class="body-content">       <h1 class="content-title">         heading     </h1>     <p>         // main image.         <img src=".jpg link comes here"></p>          // side video. on pages without video, div wouldn't exist.         <div class="profile-video red-border">           <div class="field field-name-field-video field-type-file field-label-hidden">             <div class="field-items"><div class="field-item even">                 <div class="jwplayer-video">                   <div id="77efb90a6cda2b6853724f33b58f33e7_wrapper" style="position: relative; width: 133px; height: 168px;">                     <object tag video>                   </div>                 </div>             </div>         </div>         </div> </div> 

hopefully, guess jquery able me here.

thanks.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -