Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jquery opacity not working in Internet Explorer

Featured Replies

Hi

 

Has come across opacity issues in IE.

 

$(document).ready(function(){

$('#wallpaper').animate({

'opacity': '0.4',

});

});

 

 

I can get it to work in firefox but not in IE.

 

I am a little annoyed since I though jquery was supposed to be something where you do not have to take into consideration the browser. Isnt it supposed to make life easier in that respect, otherwise it would be better to just use normal javascript.

  • Author

I think I know what is causing the problem but I do not know how to solve it.

 

The #wallpaper div is positioned absolute.

 

#wallpaper img { position:absolute; }

 

Has anyone encountered this and did you find a solution.

  • Author

Say what? :)

 

$(function() {
	$('.fadeMe').hover(function() {
		$(this).stop().animate({ opacity: 0.5 }, 500);
	}, function() {
		$(this).stop().animate({ opacity: 1.0 }, 500);
	});
});

 

I like the logo. Is that from quake?

  • Author

Okay I think I have solved it.

 

The jquery opacity transition would not work because in the css the div was set position:absolute.

 

Why this is the case I have no idea.

 

SO

 

I removed the position:absolute from the #wallpaper div.

 

I made jquery add the absolute positioning after the transition.

 

$('#wallpaper').animate({'opacity': '0.1'});

$('#wallpaper').css({'position': 'absolute'});

 

It appears to work now.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.