Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. 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’);
}
});

Friday, July 15, 2011

AspNet 4.0 Samples Released

I have released a new project on codeplex which shows many example of ASP.NET 4.0 Features
All Examples have code snippets and you can download and immediately get started.

Just download from

http://aspnet40samples.codeplex.com/

And Enjoy learning the best of ASP.net Webform Features

Chart Controls
Meta Data (SEO)
Permant Redirect
URL Routing With Coding
URL Routing With Declaring
URL Routing Outbound
Auto start
Clean Web.Config files
Predictable ClientIDS
Selective ViewState
Htm The HtmlEncoder Utility Medthod
New Rendering Option for Check Box and Radio Button Lists
Persistent GridView Row Selection
Table Free Templated Controls
Easy State Compression
Tableless Menu Control
Imperative JavaScript Syntax
The ScriptLoader
jQuery Syntax for Microsoft Ajax
AJAX Data Templates
Hidden Field Divs
Disabled Control Styling
Managing ViewState with ViewStateMode