#748 enhancement

new method : visibleRecursive

Reported by Erwane | July 29th, 2009 @ 03:30 PM | in 2.0

Hi, i've a little problem with visible() method, she only check the visibility of element, but if parent is not visible, the element is not visible, so, here, a suggestion for visibleRecursive method

visibleRecursive: function(element) {
  var isVisible = $(element).style.display != 'none';
  if (isVisible) {
    isVisible = !$(element).ancestors().pluck('style').find(function(style) {return style.display === 'none'});
  return isVisible;

This return true if element and all ancestors are visibles, or false if element or one ancestor is hidden


Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins