jQuery Tutorial: Simple Item Selector using jQuery

Advertisement
Post Pic

Introduction:

Today I came up with another article which has been posted in packtpub.com, this article helps you in developing a simple and awesome Item Selector using jQuery. I came up with my own design and icons, written CSS accordingly to place and adjust them accordingly.

Here is the article where I have posted – http://www.packtpub.com/article/simple-item-selector-using-jquery

Below are the respective snap shots of the same, For your reference preview is available at this location – http://www.developersnippets.com/snippets/jquery/item_selector/item_selector.html and you can download the source code from this location – http://www.developersnippets.com/snippets/jquery/item_selector/item_selector.zip

Simple Item Selector using jQuery

Related Entries...

You Might Like:

Advertisement

Please let us know your feedback about the article through the comments section below, we want to hear from you about our website. And your comment / advice may help us to serve you better in upcoming articles.

Thank You!
Vivekanand [Founder of DeveloperSnippets]

3 Responses

09.11.09

You need an additional check for the bottom most arrow. As it is, if you select all, or select multiples that include the last entry in the toSelectBox, your selected items will disappear.

Here is what I wrote to fix it:

$(‘#bottommost’).click(function(){
//If no items are present in ‘toSelectBox’ (or) if none of the items are selected inform the user using an alert

if(!noOptions(“#toSelectBox”) || !isSelected(“#toSelectBox”)){return;}

//If the selected item(s) index is less than last item (option) index then move that item to the last position

if($(‘#toSelectBox option:selected:last’).attr(‘index’) == $(‘#toSelectBox option:last’).attr(‘index’)){return;}

if($(‘#toSelectBox option:selected’).attr(‘index’) < $('#toSelectBox option:last').attr('index')){

$('#toSelectBox option:selected').insertAfter($('#toSelectBox option:last'));
}
return false;
});

09.11.09

Thanks Dave! that was awesome fix! thanks a lot for this… :)

Thanks,
Vivek

09.11.09

Nice article. I’ve used it but got a little problem ONLY in IE7. There is a workaround for this: http://forum.jquery.com/topic/problem-with-multi-select-move-up-down-in-ie7

Leave Your Response

* Name, Email, Comment are Required

Write For Us

Online Sponsors

Start Foreign Exchange Trading today with the Forex Affiliate Program and also you can have access Online Forex News to know what happens every single moment.


Forex Floor


Switch to our mobile site