Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-20-2013, 11:44 PM   PM User | #1
samuelito.mcf
New Coder

 
Join Date: Jan 2013
Location: Oregon
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
samuelito.mcf is an unknown quantity at this point
Internet Explorer Transparent Background on Click with Jquery.

I am trying to make it so that when a div is clicked it then gets a transparent background.

Code:
$(".homeelem").click(function () {
            $("#homeanim").css({borderBottomWidth:'1px', width:'915px',top:'360px'});
 });
I am already using this code to change other css properties but just can't seem to change the background. I'd also prefer to have this work in Internet Explorer so RGBA or Opacity isn't what I'm looking for. Generally to do this in basic CSS I use:

Code:
<style type="text/css">
background:transparent;
       filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#50000000,endColorstr=#80000000); 
       zoom: 1;
</style>
But I don't know how to implement this into Jquery. Any thoughts?

Last edited by samuelito.mcf; 02-21-2013 at 07:20 PM..
samuelito.mcf is offline   Reply With Quote
Old 02-21-2013, 06:02 AM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
use css rules in conjunction with .addClass and .removeClass instead, save yourself a ton of headaches.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Users who have thanked DanInMa for this post:
samuelito.mcf (02-21-2013)
Old 02-21-2013, 05:03 PM   PM User | #3
samuelito.mcf
New Coder

 
Join Date: Jan 2013
Location: Oregon
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
samuelito.mcf is an unknown quantity at this point
That's an awesome Idea. Can't believe I didn't think of that. Thanks!
samuelito.mcf is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:11 PM.


Advertisement
Log in to turn off these ads.