fade

Determine coordinates of a UITableViewCell while scrolling

两盒软妹~` 提交于 2019-11-27 12:11:15
My goal is to have the UITableViewCells fade in/out when they are approaching the bounds of the UITableView and about to be covered/revealed. The approach I have been trying is to get the coordinates of the UITableViewCell during a scroll event. The problem is that every cell seems to be at 0,0. I have tried converting the coordinates to the parent table and view, but they still come out at 0,0. So in general, if anyone knows a way to get the coordinates, or of a better way to go about fading UITableViewCells in and out based on their position, I would greatly appreciate any advice you may

Cocoa: NSView Animation

岁酱吖の 提交于 2019-11-27 11:35:35
问题 This is as simple as can be so I can't for the life of me find what's wrong, I looked through the documentation as a guide but it still didn't work. I have a view inside a larger view. An IBAction is supposed to fade out the inner view... that's it. Here's what I've got: NSViewAnimation *theAnim; NSMutableDictionary *viewDict; // Create the attributes dictionary for the view. viewDict = [NSMutableDictionary dictionaryWithCapacity:2]; // Set the target object to be the view. [viewDict

fadeOut() and slideUp() at the same time?

≯℡__Kan透↙ 提交于 2019-11-27 11:32:12
I have found jQuery: FadeOut then SlideUp and it's good, but it's not the one. How can I fadeOut() and slideUp() at the same time? I tried two separate setTimeout() calls with the same delay but the slideUp() happened as soon as the page loaded. Has anyone done this? Nick Craver You can do something like this, this is a full toggle version: $("#mySelector").animate({ height: 'toggle', opacity: 'toggle' }, 'slow'); For strictly a fadeout: $("#mySelector").animate({ height: 0, opacity: 0 }, 'slow'); Directly animating height results in a jerky motion on some web pages. However, combining a CSS

making the edge of the scrollview fade when scrolling in android

霸气de小男生 提交于 2019-11-27 11:31:27
问题 I have a ScrollView with an image in it. I want the edges of the ScrollView to make a fade effect when I scroll the image. I'm not talking about the effect you get when you get to the end of the scroll. I want the fade to always exist. That's what i did (not doing any effect): <ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.84" android:background="@drawable/screen_nespresso" android:fadingEdge="horizontal"

Div opacity based on scrollbar position

荒凉一梦 提交于 2019-11-27 07:54:04
Find an example of how to fade out a div when the scroll bar reaches a certain position here . But it's not a smooth throttle-type fade. Here is the code from that jsfiddle: var divs = $('.social, .title'); $(window).scroll(function(){ if($(window).scrollTop()<10){ divs.fadeIn("fast"); } else { divs.fadeOut("fast"); } });​ I want the opacity percentage to to reflect the position of the scrollbar. For instance when the scroll bar is at very top position, the div opacity is 100%. When I scroll down 35px I want the opacity of the div to fade down to 0% Perhaps a technique could be when div A is

CSS Fade Between Background Images on Hover

白昼怎懂夜的黑 提交于 2019-11-27 06:49:56
问题 Is there a way that I can do the following? I have a transparent png sprite that shows a standard picture on the left, and a picture for the :hover state on the right. Is there a way that I can have the image fade from the left image into the right image on :hover using only css3 transitions? I've tried the following, but it doesn't work: li{-webkit-transition:all 0.5s linear; -moz-transition:all 0.5s linear; -o-transition:all 0.5s linear; transition:all 0.5s linear;} li{background:url(/img

JQuery fade with loop and delay

允我心安 提交于 2019-11-27 06:29:56
问题 I have 2 Divs stacked on top of each other. I need a really simple function that will: a) Wait for 3 seconds and then b) FadeOut the top Div to reveal the second Div c) Wait 3 seconds again and then d) FadeIn the top Div again e) Loop back again Can anyone offer any advice? Many thanks 回答1: Here's an attempt. function foo() { jQuery("#mydiv").animate({opacity: 1.0}, {duration: 3000}) .animate({opacity: 0}, {duration: 3000}) .animate({opacity: 0}, {duration: 3000}) .animate({opacity: 1.0},

jQuery Change Image src with Fade Effect

岁酱吖の 提交于 2019-11-27 05:24:34
问题 I'm trying to create an effect where you click on a thumbnail image, and the link to the thumbnail will replace the main image, but fade it in. This is the code I'm currently using: $(".thumbs a").click(function(e) { e.preventDefault(); $imgURL = $(this).attr("href"); $(".boat_listing .mainGallery").fadeIn(400, function() { $(".boat_listing .mainGallery").attr('src',$imgURL); }); }); This works and replaces the image without a fade effect. What do I need to change to get the fadeIn effect to

Using fadein and append

ぐ巨炮叔叔 提交于 2019-11-27 05:03:29
问题 I am loading JSON data to my page and using appendTo() but I am trying to fade in my results, any ideas? $("#posts").fadeIn(); $(content).appendTo("#posts"); I saw that there is a difference between append and appendTo , on the documents. I tried this as well: $("#posts").append(content).fadeIn(); I got it, the above did the trick! But I get "undefined" as one of my JSON values. 回答1: If you hide the content before you append it and chain the fadeIn method to that, you should get the effect

CSS fade left to right

眉间皱痕 提交于 2019-11-27 04:40:56
Is there a way to fade elements (at least just text) in and out going left to right or vice-versa using only CSS? Here is an example of what I mean: Actually, if it requires jQuery, I'll accept that too, just as a second priority. Giona Yes, you can do it with CSS3 animations ( check browser support here ). Here's a simple demo for text-fading . HTML: .text { position:relative; line-height:2em; overflow:hidden; } .fadingEffect { position:absolute; top:0; bottom:0; right:0; width:100%; background:white; -moz-animation: showHide 5s ease-in alternate infinite; /* Firefox */ -webkit-animation: