visible

Why is my hidden <tr> not really hidden?

孤者浪人 提交于 2019-12-22 06:54:38
问题 I have this simple html markup generated from classic asp: <table> <tr class="trClass"> <td>Hello </td> </tr> <tr class ="trClass"> <td>World!</td> </tr> </table> If i set the tr belonging to Hello to hide() using Jquery it hides. Good! But, when i use this $('.trClass:visible').each(function() { alert('visible') }); it shows the output 'visible' twice. Why is this? My problem here is that im filtering a table on a column with a selection box. But after filtering i need to perform some

Calculating number of visible items in ListBox

自古美人都是妖i 提交于 2019-12-21 22:10:06
问题 I have a class called Book; class Book { public string Name { get; set; } public string Author { get; set; } public int PagesCount { get; set; } public int Category { get; set; } } The ListBox displays a list of Books and the ItemTemplate has been modified so as to visually represent the Book. The text shows the book's Name, author and the number of pages. The category, however is represented by a certain color (for example, history is blue, romance is red etc.) Now, the text has an

jquery get text currently shown (ie.not just visible)

我怕爱的太早我们不能终老 提交于 2019-12-21 20:57:38
问题 Is it possible in Jquery/jscript to get text that is currently being shown on the screen, ie. Don't get text that has display visible or similar type of property but isnt currently shown on the screen (ie. the user has to use scrollbar to view that text) 回答1: The problem is that text nodes ( nodeType 3 ) don't have mapped space on the screen so we need to wrap all the words with elements ( nodeType 1 ) so we can find the position() . Sample HTML Text: <div> "Call me Ishmael," Moby-Dick begins

What's the difference in Qt between setVisible, setShown and show/hide

岁酱吖の 提交于 2019-12-21 06:55:47
问题 Please excuse this potentially noobish question but when trying to hide a QWidget what is the difference between calling setVisible(False), setShown(False) and hide()? 回答1: show() is just a convenience function for setVisible(true) . Similarly hide() is equivalent to setVisible(false) Internally, the same code is used to render your view. See http://doc.qt.io/archives/qt-4.7/qwidget.html#show as an example. According to it, void QWidget::show () [slot] Shows the widget and its child widgets.

jquery: this.not (':animated') && that.is (':visible') not following the rules, syntax problem? only few lines of code

孤人 提交于 2019-12-19 19:34:15
问题 when i click on #button , it's stilling doing the 'do something' , even though .wrapper is animating and .wrapper span is not visible. so it's not following the rules. what's wrong? $('#button').click(function(){ if( $('.wrapper').not(':animated') && $('.wrapper span').is(':visible') ) { //do something } }) 回答1: Here you have a working demo : $('#button').click(function(){ if( $('.wrapper:animated').length>0) { $(".wrapper").text("animating") ; } if( $('.wrapper:animated').length<1) { $("

Angular 4 - how to trigger an animation when a div comes into the viewport?

*爱你&永不变心* 提交于 2019-12-18 01:11:43
问题 I've been building a new site using Angular 4 and i'm trying to re-create a effect where when a div becomes visible (when you scroll down the screen) then that can then trigger a angular animation to slide the div in form the sides. I've been able to do this in the past using jQuery outside of Angular 4 but i want to try and create the same effect using native Angular 4 animations. Can anyone offer me advice on how to trigger an animation when a div comes into view (i.e. scrolled down to

How can I check if a view is visible or not in Android? [duplicate]

[亡魂溺海] 提交于 2019-12-17 04:14:33
问题 This question already has answers here : Android: how to check if a View inside of ScrollView is visible? (13 answers) Closed 4 years ago . I set visibility to invisible like this on Android: myImageView.setVisibility(View.INVISIBLE); And then to make it visible: myImageView.setVisibility(View.VISIBLE); Now I don't know if myImageView is visible or not, how can I check it like this: if (myImageView IS VISIBLE) { Do something } else { Do something else } How can I do that? What do I have to

Best way to check if UITableViewCell is completely visible

霸气de小男生 提交于 2019-12-17 03:48:00
问题 I have a UITableView with cells of different heights and I need to know when they are completely visible or not. At the moment I am looping through each cell in the list of visible cells to check if it is completely visible every time the view is scrolled . Is this the best approach? Here's my code: - (void)scrollViewDidScroll:(UIScrollView *)aScrollView { CGPoint offset = aScrollView.contentOffset; CGRect bounds = aScrollView.bounds; NSArray* cells = myTableView.visibleCells; for

Android: how to check if a View inside of ScrollView is visible?

时光怂恿深爱的人放手 提交于 2019-12-16 20:06:44
问题 I have a ScrollView which holds a series of Views . I would like to be able to determine if a view is currently visible (if any part of it is currently displayed by the ScrollView ). I would expect the below code to do this, surprisingly it does not: Rect bounds = new Rect(); view.getDrawingRect(bounds); Rect scrollBounds = new Rect(scroll.getScrollX(), scroll.getScrollY(), scroll.getScrollX() + scroll.getWidth(), scroll.getScrollY() + scroll.getHeight()); if(Rect.intersects(scrollBounds,

Android: how to check if a View inside of ScrollView is visible?

一曲冷凌霜 提交于 2019-12-16 20:05:58
问题 I have a ScrollView which holds a series of Views . I would like to be able to determine if a view is currently visible (if any part of it is currently displayed by the ScrollView ). I would expect the below code to do this, surprisingly it does not: Rect bounds = new Rect(); view.getDrawingRect(bounds); Rect scrollBounds = new Rect(scroll.getScrollX(), scroll.getScrollY(), scroll.getScrollX() + scroll.getWidth(), scroll.getScrollY() + scroll.getHeight()); if(Rect.intersects(scrollBounds,