Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

Using jquery to change opacity of a background image

Hi

Is it possibkle to fade out a background image using jquery?

I dont want to effect any text that is on top of the background image.

I dont want to use opacity in CSS but i have little control over the current HTML

Thanks
0
coolispaul
Asked:
coolispaul
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
<div id="wrapper">
  <div id="new_background_image_same_dimension" class="opacity_class"></div>
  <div id="the_old_one_who_had_the_background">
         ANY CONTENT HERE NOT AFFECTED
  </div>
</div>

Open in new window


http://www.mightymeta.co.uk/animating-opacity-of-background-image-in-jquery-without-affecting-child-elements/
http://jorenrapini.com/blog/css/transify-a-jquery-plugin-to-easily-apply-transparency-opacity-to-an-elements-background
0
 
leakim971PluritechnicianCommented:
new_background_image_same_dimension and the_old_one_who_had_the_background need to have style : position:absolute
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now