phdphd Posted January 16, 2019 Share Posted January 16, 2019 Hi All, I am trying to apply some fading effect to a Div, for which I want also to set an hex color. This works : $('#myDiv').css('color', 'blue'); $('#myDiv').fadeIn(5000, function() { $(this).delay(3000).fadeOut(3000); }); This doesn't: $('#myDiv').css('color', '#050709'); $('#myDiv').fadeIn(5000, function() { $(this).delay(3000).fadeOut(3000); }); Thanks ! Link to comment Share on other sites More sharing options...
requinix Posted January 16, 2019 Share Posted January 16, 2019 There's no meaningful difference between those two. Are you sure you're seeing the color:blue from your css() and not from something else? Does it still seem to work with red, or green? Link to comment Share on other sites More sharing options...
phdphd Posted January 16, 2019 Author Share Posted January 16, 2019 Yes I am sure it comes from css(). And it works with any color by name, like red or FireBrick. Link to comment Share on other sites More sharing options...
requinix Posted January 16, 2019 Share Posted January 16, 2019 #050709 is close to black. Could it be working but you aren't noticing? What about something like #FFFF00? Remove the bit causing it to fade out, then inspect the element in your browser. What CSS does it report? Link to comment Share on other sites More sharing options...
phdphd Posted January 16, 2019 Author Share Posted January 16, 2019 2 hours ago, requinix said: #050709 is close to black. Could it be working but you aren't noticing? What about something like #FFFF00? Hum, I think I need to go to my ophthalmologist... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.