scroll

Scrolling parent page when remote content loads in iframe

末鹿安然 提交于 2020-01-07 04:33:27
问题 I'm working on a website that loads remote content (real estate property listings) in an iframe on the main page. The issue being that the frames are quite long, and the navigation between pages of listings (located within the remote content of the iframe) sits at the bottom. Hence, when the 'next' button is clicked, the next page loads but it's at the bottom of the content because the parent page is the one scrolling. So what I want to do is make the parent page jump to the top whenever new

Unable to scroll to a div element using hash in Angular app

倖福魔咒の 提交于 2020-01-07 04:20:52
问题 I have read here and here that a page can be scrolled to a specific element using just a hash selector and a id attr. But for some reasons I am unable to do it in my Angular application. Can this be due to the usage of routing ( angular-ui-router ) in my app. What I am trying to do is moving to a specific section of one of my page, which by the way are loaded in to a state using routing. I have : <div class="nav_panel"> <a class="nav_links" href="#footer">Footer</a> </div> and <div class=

Unable to scroll to a div element using hash in Angular app

懵懂的女人 提交于 2020-01-07 04:20:24
问题 I have read here and here that a page can be scrolled to a specific element using just a hash selector and a id attr. But for some reasons I am unable to do it in my Angular application. Can this be due to the usage of routing ( angular-ui-router ) in my app. What I am trying to do is moving to a specific section of one of my page, which by the way are loaded in to a state using routing. I have : <div class="nav_panel"> <a class="nav_links" href="#footer">Footer</a> </div> and <div class=

JQuery scroll() / scrollTop() not working in IE or Firefox

﹥>﹥吖頭↗ 提交于 2020-01-07 03:03:31
问题 The script below displays a dotted line from the top of the screen to an up arrow which position depends on how far down the page the user has scrolled so that they can then click the arrow to scroll back to the top. This works great in Chrome but doesn't work at all in IE or Firefox, i.e. the dotted line does not grow nor does the arrow move down the page on scroll. Does anyone know why this is? HTML: <div id="dotted-line"> <div id="up-arrow">^up</div> </div> JS: $(window).scroll(function(){

Trigger function when element is visible on screen (viewport)

半城伤御伤魂 提交于 2020-01-07 02:55:08
问题 jQuery has the plugin appear or waypoint to detect if element is visible or not in viewport. I did some research, I can not find and wonder if Angular2 has a similar plugin. If not yet, what is the best way to do something like that? 回答1: This is how I do it: sync-dom.utils.ts static isInViewPort(rect: ClientRect, threshold = 0) { return rect && rect.height && rect.top + rect.height + threshold >= 0 && rect.left + rect.width + threshold >= 0 && rect.bottom - rect.height - threshold <=

Horizontal scrolling touch menu?

ぃ、小莉子 提交于 2020-01-06 17:15:51
问题 I am building a mobile website, and the client wants a menu bar at the top. The menu is very wide, so he wants it to be horizontally scrolled by dragging it left and right. app.ft.com has similar functionality (although you must view this on on an iPhone to see it working) Does anyone know of a jQuery / jqTouch script that can achieve this? I have tried scrollTouch, but that only scrolls the whole page, not just a menu. 回答1: Take a look at this http://plugins.jquery.com/project/Touchwipe

Horizontal-Scrollable menu bar with tweening animation

不打扰是莪最后的温柔 提交于 2020-01-06 16:06:25
问题 I wanted to build a custom UI component which consist of a button and a menu bar. When the button is clicked, the button will tween away from the screen, then the menu bar will tween in. The menu bar is built a set of icons scrollable horizontally. Such example is like the Fox News app where you select the type news you want from the scroll bar. Such as shown here. Another example is on the app Thinking Space, when user click on the menu button and the drawing toolbar comes up. I need exactly

Horizontal-Scrollable menu bar with tweening animation

别等时光非礼了梦想. 提交于 2020-01-06 16:01:30
问题 I wanted to build a custom UI component which consist of a button and a menu bar. When the button is clicked, the button will tween away from the screen, then the menu bar will tween in. The menu bar is built a set of icons scrollable horizontally. Such example is like the Fox News app where you select the type news you want from the scroll bar. Such as shown here. Another example is on the app Thinking Space, when user click on the menu button and the drawing toolbar comes up. I need exactly

Background attachment local - How to have child elements with background colours and still see scroll effect?

£可爱£侵袭症+ 提交于 2020-01-06 15:17:20
问题 I am trying to acheive Pure CSS scrolling shadows using background-attachment: local but with a background colour on the items that are being scrolled. I was inspired by this article http://lea.verou.me/2012/04/background-attachment-local/ but in their example they do not have a background colour on the child elements. The problem is that the child elements are above the parent on the z-index scale which means their background colour covers the shadow effect. I know that I can cheat this by

Synchronizing a WPF ScrollViewer with a WinForms ScrollBar

你说的曾经没有我的故事 提交于 2020-01-06 14:39:08
问题 Due to an unsolved issue in my current project [ Weird scrollbar UI in hosted WPF composite control ], I've had to defer to workarounds. One such idea I came up with was to keep the ScrollViewer in question in sync with a Windows Forms ScrollBar (horizontal and vertical). How would I go about doing that? In essence, I want the WinForms scrollbar(s) to work like the ScrollViewers (in terms of dragging and events suchlike). 回答1: I think there's no any other way than send/listen to the lo-level