Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Tuesday, March 13, 2012

Is really visible JQuery Selector

Sometimes you will face a challange with jQuery Selectors that a DOM element is really visible or not.
Lets take following example

A Parent div is hidden and there is a txtname inside it which is not visible to the viewer as its parent div is not visible and based on this you need to take a action
so now you can use this extender selector to find out this is really visible or not




$.extend(
$.expr[":"],
{
reallyhidden: function (a) {
var obj = $(a);
while ((obj.css(“visibility”) == “inherit” && obj.css(“display”) != “none”) && obj.parent()) {
obj = obj.parent();
}
return (obj.css(“visibility”) == “hidden” || obj.css(‘display’) == ‘none’);
}
}
);
$(document).ready(function()
{
if($(‘#something’).is(‘:reallyhidden’)){

alert(‘yes’);
$(‘#something’).parent().show();
}
else{
alert(‘no’);
}
});

Tuesday, July 28, 2009

Great Javascript IDE Aptana

Hi folks

I Would love to share this info on a great IDE which is eclipse based

http://www.aptana.com/

Download it and use it for many purpose

the coolest feature which i like that it tells me that this javascript will work on IE or FF It include many popular js libs like JQuery

you can also use it for
PHP
Ruby On rails
Python
Adobe Air
And IPhone Development


Regards
Darshan Marathe