SAAS-744 - Updated double click and Add button functionality on Now Playing and Add/Remove content screens
This commit is contained in:
parent
4e37788d92
commit
8aea86b451
3 changed files with 65 additions and 9 deletions
|
@ -213,3 +213,21 @@ function resizeToMaxHeight(ele, targetHeight){
|
|||
img.css("width", newWidth+"px");
|
||||
}
|
||||
}
|
||||
|
||||
/* From http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport/#7557433 */
|
||||
function isInView(el) {
|
||||
//special bonus for those using jQuery
|
||||
if (typeof jQuery === "function" && el instanceof jQuery) {
|
||||
el = el[0];
|
||||
}
|
||||
|
||||
var rect = el.getBoundingClientRect();
|
||||
|
||||
return (
|
||||
rect.top >= 0 &&
|
||||
rect.left >= 0 &&
|
||||
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */
|
||||
rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue