0

Code Cast 31 – Agile for Families

Posted by David Starr on Aug 31, 2009 in Dotnet  | View Original Article
 

This episode is a recording I made during my talk at the Agile 2009 conference in Chicago. The session, “Agile for Families, Iterating with Children”, was surprisingly popular. In addition to the slides and the audio, I am including a link to the IEEE paper that went along with this session. That’s right! There is an IEEE paper about Agile at home. Awesome :)

The slides from the talk are available below. The slide deck I am posting here is a bit larger than the one used in the talk. These slides include some interviews with the Starr kids that were left out of the slides at the conference for time reasons.

This episode is less rocket surgery, and more brain science. I hope you enjoy the show.

Get the show here

View in iTunes Any Podcatcher

Tags: ,

 
0

Odd/Even Looping in ASP.NET MVC

Posted by Rick Strahl on Aug 31, 2009 in Dotnet  | View Original Article
 

Ran into a post from Scott Sandersen earlier in which he laments the verbosity of doing things like odd/even parsing in an iterative loop in ASP.NET MVC. Steve proceeds to show an abstract solution which is a great idea for more complex scenarios, but if all you need is odd even type parsing may be a bit of overkill especially since it such a common scenario.

I tend to use a slightly simpler approach for odd even figuring based on a logical variable that’s changed in a loop. Here’s what my version of similar code looks like:

    <% bool oddEven = true;
       foreach (CodeSnippetListItem snip in snippetList)
       {  %>
       
        <div class="<%= (oddEven = !oddEven) ? "evenclass" : "oddclass" %>">
            Content goes here...
        </div>
    <% } %>

That’s not too bad to read as far as tag soup goes. The key is a logical var that is simple ‘not-ed’ – this can be done after the { or as I’ve done here direclty inline of the expression. The only hard part with this code is figuring out whether it starts on odd or even :-}

Another option is to use some client script code – jQuery can make short work of applying classes after the page’s been loaded.

<script type="text/javascript">
    $(document).ready(function() {
        $(".snippet:odd").addClass("listalternate");
    });    
</script>

Given the two approaches I think the former is the better choice because I like to keep the display at the point where it’s applied in the HTML or style sheet and just in case JavaScript doesn’t work the display is consistent either way.

Options are good though…

© Rick Strahl, West Wind Technologies, 2005-2009
Posted in MVC  
kick it on DotNetKicks.com

Tags:

 
0

DevExpress Nominated for 2009 Community Choice Awards; Vote Now!

Posted by Mehul Harry (Developer Express) on Aug 31, 2009 in ASP.Net, Dotnet  | View Original Article
 

Windows IT Pro and SQL Server Magazine are conducting the 2009 community choice awards. We’d really appreciate your votes for DevExpress.

2009 Community Choice AwardsSpend about 30 seconds and please cast your votes for DevExpress. We’re nominated in the following categories:

On page one:

5. Best Business Intelligence & Reporting Product - DevExpress XtraReports Suite

10. Best Development Tool - DevExpress CodeRush

On page two:

32. Best Free or Open Source IT Tool - DevExpress CodeRush Express

If you’re wondering why DevExpress wasn’t nominated for a particular category then add your own DevExpress product by using the “Other (please specify)” textbox under each category. For example:

33. Best Vendor Tech Support – [Other (please specify): DevExpress]

Be sure to fill out the last category (#34) with your name and email address. This allows them to weed out fraudulent or duplicate votes and you could win some cash or prizes.

Thank you for your voting support! Click here to vote now for DevExpress!

Tags: , , , ,

 
0

Memory Management with the Dictionary Object

Posted by Tom Barker on Aug 31, 2009 in Flex  | View Original Article
  In my previous article I detailed the architecture for a video player that would switch between multiple players, using composition to support the same interface across each layer of the architecture. The architecture worked out really well, but when I...

Tags: , , ,

 
0

New Poll: The Best of RIA 2009 – Semi Finals

Posted by Rich Tretola on Aug 31, 2009 in Flex  | View Original Article
  Over the past 3+ weeks we have done the following. First, we asked you to "Help us choose the best RIA of 2009 / Adobe MAX". Next, we took 20 of those nominations and split them into 2 groups...

Tags: , ,

 
0

F*CSS – CSS support for AS3

Posted by Jesse Freeman on Aug 31, 2009 in CSS, Flex  | View Original Article
  F*CSS - CSS support for AS3 F*CSS is a new library I have been working on to help fill in the gaps in AS 3's CSS support. This began in my Flash Camo Framework's PropertySheet system and is now evolving...

Tags: , , , ,

 
0

Really Useful Tutorials You Should Have Read in August 2009

Posted by W3Avenue Team on Aug 31, 2009 in Javascript, Tutorials  | View Original Article
 

This update covers tutorials, how-to, screen casts, tips and techniques that you should have read in August 2009. Featured authors include: Soh Tanaka, Matt Aimonetti, Enrique Ramirez, Giulio Bai, Dario Gutierrez, John, Kevin Liew, Christoph Dorn, Pallav Nadhani, Cameron Chapman, Vasilios, Satbir Singh, Michael Owens, Lam Nguyen, Chris Spooner, Jean-Baptiste Jung, Janko Jovanovic, Chris Coyier, Jeffrey Way, Ibrahim Al-Rajh, Jon Phillips, Curtis McHale, Jacob Cass, Inayaili de Leon, Alex Coomans and Nuno Franco da Costa.

Featured Publications/Blogs include: DesignM.ag, Riding Rails, Smashing Magazine, WPBeginner, MyInkBlog, Flashtuts+, WebGurus, Queness, Christoph Dorn’s Blog, Nettuts+, Noupe, Web Developer Plus, PHP HTML Tutorials, AEXT, Line25, Janko At Warp Speed, CSS-Tricks, Afresherweb, Design O’Blog, Spyre Studios, Six Revisions, and Hongkiat.

So which articles you found most useful. Also feel free to recommend any article that we may have missed.

Similar Posts:

Tags:

 
0

Desktop Wallpaper Calendars For September 2009

Posted by Smashing Editorial on Aug 31, 2009 in Design & Graphics  | View Original Article
 

 

Desktop wallpapers can serve as an excellent source of inspiration. However, if you use some specific wallpaper for a long period of time, it becomes harder to draw inspiration out of it. That’s why we have decided to supply you with smashing wallpapers over 12 months.

And to make them a little bit more distinctive from the usual crowd, we’ve decided to embed calendars for the upcoming month. So if you need to look up some date, isn’t it better to show off a nice wallpaper with a nice calendar instead of launching some default time application?

This post features 50 free desktop wallpapers, created by designers across the globe. Both versions with a calendar and without a calendar can be downloaded for free.

Please notice:

  • all images can be clicked and lead to the preview of the wallpaper;
  • you can feature your work in our magazine by taking part in our desktop wallpaper calendar series. We are regularly looking for creative designers and artists to be featured on Smashing Magazine. Are you one of them?

So what wallpapers have we received for September 2009?

Learn more about the Smashing Book!

Want to learn more about CSS coding and web design? Take a look at our upcoming Smashing Book ($23.90 $29.90, available worldwide). Pre-order now with 20% discount!

Snow Leopard

“The new version of Mac OS X, Snow Leopard, has just been released, so I wanted to celebrate it with new artwork. In some way, I designed it in contrary to the OS box design, which is a bit too aggressive. Well, mine is a bit too ’sweet’ probably :-)” Designed by Vlad Gerasimov from Irkutsk, Russia.

Smashing Wallpaper - september 09

Colors of Autumn

"Illustration presenting the beginning of autumn." Designed by Berenika Kolaczynska from Poland.

Smashing Wallpaper - september 09

Little Paris

"This was fun to play around with.Hope you guys like it.It shows the city center of Bucharest, Romania in the golden era of the city.Back then itwas called “The little Paris”.The image is part of an existing calendar ilustrating the old Bucharest in different times of the year." Designed by Ilie Vlad from Romania.

Smashing Wallpaper - september 09

V for Vendetta

"This wallpaper was inspired by the movie V for vendetta (one of my favourites), the quote is from a very dramatic part of the movie where V kills one of the characters after having said the line(hence the blood)." Designed by Luka Dadiani from UK.

Smashing Wallpaper - september 09

Caballito

"Ride a small sea horse and find the depth of your own ocean." Designed by pampaneo from Spain.

Smashing Wallpaper - september 09

Prelude

"An experiment with photo manipulation and digital collage techniques. (Many thanks to&nbspand that provide free high quality images for mixing and alteration. Also, thanks to for the free script font, Porcelain)." Designed by S. Beehler from Canada.

Smashing Wallpaper - september 09

Sunset Supervisor

"My wallpaper is an illustration of the Sunset Supervisor, Jack the Gecko and the White Elephant on an expedition through the desert of time." Designed by Manuel Esposito from Germany.

Smashing Wallpaper - september 09

Centuries

Designed by Valentin Bojilov.

Smashing Wallpaper - september 09

Where Acorns Come from

"Acorns coming to life in September." Designed by Monica Corduneanu from Romania.

Smashing Wallpaper - september 09

Queen

"Forest in Autumn." Designed by Jana Jelovac from Serbia.

Smashing Wallpaper - september 09

Sticking Art

"The idea behind my wallpapers is ‘Smashing Magazine’ with it’s amazingway of taking art from every place around the world and putting it infront - it is the way I thank you for everything you do." Designed by Catalin Boroi from Romania.

Smashing Wallpaper - september 09

Upside Down World Map

Designed by Vlad Gerasimov from Irkutsk, Russia.

Smashing Wallpaper - september 09

Dussehra

"Dussehra is a very famous festival of hindu people. On this holy day lord ram killed dashanan (rawan). So it is a holy religious day and celebrated as the victory of truth and goodness over bad people. On this day, effigies of Ravana, Kumbhakaran and Meghanad are stuffed with firecrackers and set alight." Designed by Supriya Kunal Dcunha from India.

Smashing Wallpaper - september 09

Illustration Talk Like a Pirate Day

"A little Illustration for the month of the International Talk Like a Pirate Day." Designed by Leo Lemes from Brasil.

Smashing Wallpaper - september 09

Shattered

"September marks the beginning of Autumn and this wallpaper design is a geometric depiction of dead leaves falling from trees." Designed by Franz Jeitz from Luxembourg.

Smashing Wallpaper - september 09

The Jam Factory

"The tastiest jam is being freshly prepared in the sky." Designed by Chris Alexander (Yipori) from England.

Smashing Wallpaper - september 09

Glowing Grunge

Designed by Sebastian Gonzalez from USA.

Smashing Wallpaper - september 09

Potato Pirates

"September being the national “potato month”, and having the international”talk like a pirate day” on the 19th, inspired us at gelattina to create a wallpaper, celebrating these two things.. that’s why we have Mr. Potato Pirate and his crew!! ARGGH…" Designed by Débora Márquez from Gelattina, México.

Smashing Wallpaper - september 09

Neon House Spirit

"This deserted house needs some magic to return for life… so i send him a little bit of neon spirit light, maybe after it will recover his past life…and you some inspiration!" Designed by Dovi Vausk from Lithuania (resident Spain).

Smashing Wallpaper - september 09

Music

"This is a little wallpaper I did according to abduzeedo’s supercool frilly bits typography tutorial of course i changed a lot of details so as to make it look different. The wallpaper itself has one simple word “Music” why? Because I love music I think u can get the hidden meaning yourself. " Designed by Luka Dadiani from UK.

Smashing Wallpaper - september 09

Last Melitea

"Just another thought to the summer… September will bring a lot of nostalgia ;(" Designed by m-mstudio from Italy.

Smashing Wallpaper - september 09

Chicken Sunrise

"”The Inspiration for this Calender is the city of Mumbai itself. The city which usually never sleeps, but gets buzzing right in the early hours!I shot this picture of the hen, who was probably laying her eggs, but looks lost and sleepy in her thoughts! The graphic represents the hustle-bustle of Mumbai, represented by itstwo most common (and cheap) modes of transport- the three wheelers and the vintage FIAT taxi’s! Its Chaotic, Its Grungy, Its loud and Buzzing, but like thischaos has its own symphony which unfolds in front of you everyday!”A little bit about me - I’m Principal - Design at Pineapple Consulting ( www.pineappleconsulting.biz ), we deal into areas like branding and communication design, Product and packagingdesign, and interaction design! Located in Mumbai, India, I’m looking to meet some interesting people and projects from across the world!" Designed by Ameet Mehta from India..

Smashing Wallpaper - september 09

S for September

"I made this wallpaper because I am a big fan of Typography especially the Old English type, I drew the S myself and then scanned it in and made a wallpaper, I hope you will like it, let me know what u think." Designed by Luka Dadiani from UK.

Smashing Wallpaper - september 09

Brown September

Designed by Barney from Slovakia.

Smashing Wallpaper - september 09

First Fog

"This is the day the first fog came to this valley after a hot summer. The castle is preparing for the autumn. My first contribution to Smashing Magazine, feels really good though I didn’t have much timeto work on this one. Thanks for the inpsiration and the best online magazine ever!" Designed by Akif Top from Sweden.

Smashing Wallpaper - september 09

Field of Gold

"Ready to start again after vacation? Take a deep breath! If you use an unsupported resolution and would like a version please send me an email: I’ll do my best to create it." Designed by Federica Sibella from Italy.

Smashing Wallpaper - september 09

Darkness with Rays of Light

"Here comes another September filled with equal darkness and rays of light. The darkness and light flows in circles. The birds are tweeting to welcome the spring. The colorful lights are all around.Blessed are us for this is a transformation of energy. That will return three-fold back!" Designed by Puneeta Prakash from India.

Smashing Wallpaper - september 09

Circles

Designed by Hector Ruiz Gonzales from Peru.

Smashing Wallpaper - september 09

Curiosity and the Rose

"Alaskan Malamute Dog and Red Rose, This work is dedicated to the Public Domain. You may use this photo for any purpose, including commercial." Designed by Photos8.com from USA.

Smashing Wallpaper - september 09

The Blessed Night of Al-Qadr

"The first day of September 09 will be the 11th day of the Holy month of Ramadan in the Hijri calendar. The month of Ramadan is a very special month for the entire Muslim nation. Muslims are supposed to fast this holy month. Fasting is from first light of dawn until sundown, abstaining from food, drink, and sexual relations. On the moral, behavioral side, one must abstain from lying, malicious gossip, quarrelling and trivial nonsense. Fasting is a great act of worship for the Muslim which he performs by neglecting his desires to please his Lord and hopes for His Reward. The last 10 days of Ramadan have special virtues. Among the unique virtues of these special nights is that Laylat al-Qadr (the night of veneration or honor) is among them. It is the night on which the Quran was sent down. God described it as being blessed and better than a thousand months. He forgives the previous sins of the one who stays up and prays during this night out of faith and in hope of earning the reward from Him." Designed by Ahmed Hassan Alley from Egypt.

Smashing Wallpaper - september 09

Walking

Designed by Pedro Quesada from Spain.

Smashing Wallpaper - september 09

Smashing September

"A type-based wallpaper celebrating Smashing’s September set of wallpapers!" Designed by Justin Zalewski Design from USA.

Smashing Wallpaper - september 09

The Gift of The Nile

"The Greek historian, Herodotus, wrote that ‘Egypt was the gift of the Nile’, and in a sense that is correct. Without the waters of the Nile River for irrigation, Egyptian civilization would probably have been short-lived. The Nile provided the elements that make a vigorous civilization, and contributed much to its lasting three thousand years." Designed by Mahmoud Ahmed Hamam from Egypt.

Smashing Wallpaper - september 09

Zommmbie Girl

Designed by John Kichote from Poland.

Smashing Wallpaper - september 09

Coils

"September, the time when most of the worlds students go back to school after the summer holidays, something to cheer them up." Designed by Aleksey from Australia.

Smashing Wallpaper - september 09

Septypo

"Best month in the Year. Elegant Helvetica typography." Designed by Dannci from Slovakia.

Smashing Wallpaper - september 09

Breathe

Designed by Misty Michelle from USA.

Smashing Wallpaper - september 09

Dogtember

"Dedicated to all doggies missing their masters" Designed by Inna Dekhtiar from Ukraine.

Smashing Wallpaper - september 09

Bye Bye Beach

"The photo was taken at Sidmouth (England) this summer. The arm is a friend who posed in other photos." Designed by Jesús Ludeña from Guadalajara, Spain.

Smashing Wallpaper - september 09

September Colors

"”September Colors” wallpaper is based around colourful starting and peaceful endings. Most people think that the most favourable color for the month of September is purple but I refuse to agree. So i created this wallpaper with some mix feelings." Designed by DKumar M. from USA.

Smashing Wallpaper - september 09

September

"There are many remarkable events in september which make this month importantfor everyone.Some countries celebrate their independence day in it and some nations ascribe its daysfor remembering their heros. 11 September brings sad memories thus many good and bad belong tothis month. It also brings a special day (birthday) for me. Through this typographic wallpaper I try toexpose the value of september." Designed by NarjisNaqvi from Pakistan.

Smashing Wallpaper - september 09

Autumn Green

"Autumn starts on or around 15 September in solar term. September begins on the same day of the week as December every year. September’s birthstone is the ‘sapphire’ which means clear thinking. The birthflowers for this month are the ‘forget-me-not’, and ‘aster’. " Designed by Sagar from Bangladesh.

Smashing Wallpaper - september 09

Tea anyone?

"In September the weather gets cold and it starts raining very often, here in Germany. A nice way to keep yourself warm is a delicious cup of tea. I designed a clean wallpaper with some nice typography-elements and a warm cup of tea to express all that." Designed by Jens Thamm from Germany.

Smashing Wallpaper - september 09

September Sentense

"Just motivating sentence for September :)" Designed by Temeshi from Poland.

Smashing Wallpaper - september 09

A Geometric Vision

"This months wallpaper is inspired by the work of Andy Gilmore with the colours swatch based on the Blade Runner (final cut) DVD cover. The font is called Neighbourhood by Andy Chung" Designed by Paul Randall from England.

Smashing Wallpaper - september 09

Rusting Beauty

"Old Changi Hospital in Singapore is a favourite amongst thrill-seekers and photographers for spine-chilling and paranormal experience. Served its purpose during WWII, decades of desolation brought the all-too familiar forlorn spookiness which abandoned architecture tends to present. Hopefully HDR techniques can bring out the rusting beauty in them." Designed by Wong Kuo Tsung Jordan from Singapore.

Smashing Wallpaper - september 09

Hang In There

"Things are always changing - hang in there: it’ll be alright." Designed by Marlaine Weber from Canada.

Smashing Wallpaper - september 09

Existence

"Through thought and madness the gods of ages past dwell in eternal etherial lands, where time is lost and insight gained." Designed by Daniel Whyte from New Zealand.

Smashing Wallpaper - september 09

Full Moon Dancing

"Just the imagination of the full moon dancing,inspired by the music album named “Buddha Moon”, produced by Chinmaya Dunster." Designed by Smalllotus from China.

Smashing Wallpaper - september 09

Dream

Designed by Carolina Araujo from Brasil.

Smashing Wallpaper - september 09

September Song

"A dark visualization of “September Song”, a song composed 70 years ago by K. Weill and M.Anderson, recorded by many music monsters (Frank Sinatra, Sara Vaughan, James Brown,Willie Nelson, Lou Reed)… and printed on the background of this wallpaper." Designed by Daniele Marino from Italy.

Smashing Wallpaper - september 09

Retro Fall

"Simple and minimalistic wallpaper with a retro feel based on my analog photographs from Tokyo." Designed by Adrian Tomic from Sweden.

Smashing Wallpaper - september 09

Join in next month!

Please notice that we respect the ideas and motivation behind artists’ work which is why we’ve given artists full freedom to explore their creativity and express emotions and experience through their works. And this is also why the themes of the wallpapers weren’t anyhow influenced by us, but designed from scratch by the artists themselves.

Thanks to all designers for participation. Join in next month!

What’s your favorite?

What’s your favourite theme or wallpaper for this month? Please let us know in the comments! And have a smashing September, folks!


© Smashing Editorial for Smashing Magazine, 2009. | Permalink | 9 comments | Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags: , , ,

Tags: , , , ,

 
0

Pingdom – Track Your Website’s Uptime and Performance

Posted by W3Avenue Team on Aug 31, 2009 in Javascript  | View Original Article
 

Pingdom is popular website monitoring service that helps you discover any problem with your website the minute it happens. You will be immediately alerted so you can take action before it affects your business. You will also be able to see detailed statistics of your website performance, giving you a historical record of all incidents.

Pingdom up till very recently was a pay-only service, but is now offering free accounts as well (with no strings attached). Pingdom Free has all the features of paid account types. The only limitation is that you can only monitor one website or server, but that should be enough for a lot of bloggers and hobbyist webmasters out there.

Features

  • You handle all your settings from an online control panel. No need to install anything.
  • Tests can be performed as often as every minute.
  • Tests are performed from multiple locations on the Internet.
  • You can get error alerts via both email and SMS.
  • You get access to reports on downtime and response time.
  • When an error is detected, Pingdom performs additional tests for you, helping you troubleshoot.

You can sign up for the Free account on the Pingdom homepage.

Similar Posts:

Tags: , , ,

 
0

Getting and setting max zIndex with jQuery

Posted by Rick Strahl on Aug 31, 2009 in Dotnet  | View Original Article
 

I have a fair number of applications that use pop up windows and other draggable elements  that are stackable. When dragging and moving windows around the page it’s often critical to ensure that windows show up in the proper zOrder without having to explicitly assign the window order.

A typical scenario for this is dragging multiple windows like this:

 OverlappingWindows

When you drag one window that window should pop to the top of the zOrder and stay there once the window is dropped. The idea is that as windows are dragged the zIndex keeps getting re-arranged in such a way that the last dropped window/element ends up on top of the zIndex stack. You can try this out online here. If you use Add two windows are open – move them around to see how this works. Also notice that the List window always pops on top when Add is clicked and this is where the zIndex plugin discussed below comes in.

A long time ago (prior to jQuery Ui) I built my own draggable plug-in and one of the main things it did is upon dropping it would elevate the zIndex up by a few tick which was crucial. While that worked it was still guess work trying to find a zIndex that wasn’t already taken up by some other component but it worked more or less. At the time I allowed specification of a zIndex value for the dragged window and the component would bump that for each window dragged. 

jQuery' Ui’s draggable initially didn’t have this feature (which was annoying), but it’s been added in later iterations as well using the stack option parameter. My lightweight version and jQuery ui version are fairly compatible so if the jQuery Ui one is loaded that will be used and both understand and use the stacking feature.

To set up stacked dragging using jQuery Ui and the draggable plug-in you might do something like this on all ‘dialogs’ (not jQuery.ui Dialogs):

$(document).ready(function() {
    var dialog = $(".dialog")
                    .draggable({opacity: .25,
                                cursor: "move",
                                stack: { group: "*", min: 50 },
                                handle: ".dialog-header"
                                })
                    .shadow()
                    .closable();
});

and that handles the zOrder  correctly without explicitly having to manipulate the z-index of any dragged elements. Surprisingly this isn’t the default behavior though.

However there are situations where you might have to manually force a window to the top. In my case I have several places where multiple windows are opened when a page is loaded or a button is clicked and they have to open in a specific stacking order. In order to accomplish this I have to force the windows to the top one at a time in the right order. Also internally in my framework there are a number of places where I definitely need to know the max zorder – for example for modal dialogs which should pop on top whatever content is on the page regardless of what their zIndex.

A small maxZIndex Plug-in

After having written some code to do this a few times I created a small plug-in that handles both finding the max zIndex and incrementing it by a specific value on the selected element(s). The latter is probably the more common case – it’s rare that you need to know the highest zOrder but don’t actually need to set it.

Anyway here’s the code that implements the plug-in and utility function in one implementation:

$.maxZIndex = $.fn.maxZIndex = function(opt) {
    /// <summary>
    /// Returns the max zOrder in the document (no parameter)
    /// Sets max zOrder by passing a non-zero number
    /// which gets added to the highest zOrder.
    /// </summary>    
    /// <param name="opt" type="object">
    /// inc: increment value, 
    /// group: selector for zIndex elements to find max for
    /// </param>
    /// <returns type="jQuery" />
    var def = { inc: 10, group: "*" };
    $.extend(def, opt);    
    var zmax = 0;
    $(def.group).each(function() {
        var cur = parseInt($(this).css('z-index'));
        zmax = cur > zmax ? cur : zmax;
    });
    if (!this.jquery)
        return zmax;

    return this.each(function() {
        zmax += def.inc;
        $(this).css("z-index", zmax);
    });
}

To use it I can do something like this:

function DoToTop() {
    // Set the zIndex to max + 5
    $("#divDialog").maxZIndex({ inc: 5 });
    
    // Get the zIndex as a number
    alert($.maxZIndex());
}

The first jQuery wrapped set function finds the max zIndex value and increases it by 5 on the divDialog element. If I use the utility function $.maxZIndex() I get the value returned instead. IOW, the utility function returns a value, the plug-in sets the value.

This plug-in and utility function setup may seem like an odd choice but I did want the option of not passing a parameter to the plug-in function that sets the zIndex. So doing just:

$("#divDialog").maxZIndex();

also sets the maxZIndex() with the default values – ie. incremented by 10. Why the increment?  Often you want to inject other elements later for example a modal dialog is displayed first and the modal background added later with a lower zIndex and using an increment value allows for a little space to add additional elements if necessary.

The option parameter to the plug-in has two configuration values:

inc
The value to increment the max zOrder found in the specified group of elements. Defaults to 10.

group

A selector of elements that are searched for finding the max zIndex value. Defaults to “*”

Very simple, but highly useful at least in my code. I’ve been able to throw out a ton of z-index related code in various of my own plug-ins which is sweet. Maybe some of you might find this useful as well.

Resources

If you want to check out the sample shown above you can grab it from the West Wind West Wind Web Toolkit repository.

West Wind Web Toolkit Source and Examples

© Rick Strahl, West Wind Technologies, 2005-2009
kick it on DotNetKicks.com

Tags: ,

Copyright © 2010 Answer My Query All rights reserved. Maintained by Orange Brains .