![]() | |||||
![]() |
|||||
|
Modern Signal Development Blog
TopicsNews, tips, tricks and discussions related to Modern Signal Lighthouse, ColdFusion, Asp.Net and other web development technologies. Viewing posts for topic: "jQuery". View all posts. Tokenized Auto-Complete jQuery Plugin
This post is related to the tokenized auto-complete jQuery plugin available at http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/. It is a great plugin. There are several comments in the discussion on that page regarding the following mods to the plugin.
It took me a few hours to update the plugin to implement these mods, so I wanted to share the results. Here is a demo of the plugin modified to for the above items. Ideally, the plugin would be updated to allow local and remote lookups. However, I did not have time to implement in this manner, so my version solely works for local lookups. Comments (0) Posted on November 4, 2009 1:26:58 PM EST by David Hammond Complex Styled Menu with jQueryI recently finished a redesign project, and there were some interesting challenges that came up that I thought I would write about. To start off, there were the menus. The site has an obligatory drop-down menu at the top, and a similarly styled menu on the left. Here's a look at the drop-down menu:
As you can see the items in the menu have a little caret on the left, they turn a darker gray on mouseover, and certain items (members-only ones) have a special star icon on the right. There are also submenus with the same style. I'm not going to talk about the specific javascript implementation that I used for the drop-down (I used a slightly modified version of the jQuery plugin jdMenu to get it done -- http://jdsharp.us/jQuery/plugins/jdMenu/), but will instead address how the styles are implemented, which was a bit trickier than you might think. The html for the menu is a simple nested unordered list: <ul> Nice and clean and accessible. But the style has to be pixel perfect too, of course. When I got the menu from the designer, the caret and the star were implemented with a single background image. That made sense to some extent. You can only have one background image per element. And I can't use the <li> for one of the background images because the only elements that supports the hover is the <a> tag. And I needed to use the a:hover css selector to make the items turn dark gray on mouseover. Fine. But that really makes things a bit complicated and inflexible. What if I need to adjust the width of the menus (which did indeed happen several times during the redesign)? I would then need to recreate those background images with the correct width. I know just enough Photoshop to do that kind of thing, but it's really annoying. Finally it occurred to me that there's really no reason that the <a> tag is the only one that can do a hover. With javascript, I could capture the hover for any element. What is more, jQuery made this very easy to do. I added this to my page: $("td.leftnav ul li").hover(function(){ (Okay that bit of code applied to my left navigation menu. jdMenu actually took care of this for my top nav by adding a "jdm_hover" class.) So with that little bit of code, I was free to set the caret as the background of the <li>, and set the star as the background of the <a>, and let the hover of the <li> take care of the background color change. And when I inevitably got that call to change the width of the menus, it was a simple change in the stylesheet. Comments (0) Posted on September 22, 2009 3:08:41 PM EDT by David Hammond |
August 2010 -- Modern Signal completes integration of new design for Teaching Strategies.com.
July 2010 -- Modern Signal launches new site for the NAHB International Builders'Show, the largest residential building industry tradeshow in the world.
July 2010 -- Modern Signal awarded contract to build a social media plan for The International Manufacturing Technology Show, one of the largest industrial trade shows in the world, with more than 1,100 exhibitors and over 92,000 visitors.
July 2010 -- Modern Signal completes launch of Teaching Strategies GOLD, a brand-new assessment tool with feature-rich tools for teachers, administrators, parents and trainers.
June 28, 2010 -- Modern Signal launches redeveloped website for National Health Policy Forum, a nonpartisan research and public policy organization at The George Washington University. The new site includes admin tools to manage email announcements, event invitations and RSVPs, surveys, and an extensive library of publications and meeting materials. The site also features a customized Google Search integration, and a new content management system was integrated within the existing design and information architecture of the site. -View-
April 22, 2010 -- Modern Signal launches a redesigned website for The NALP Foundation for Law Career Research and Education, a nonprofit organization that works to ensure that the legal community and society at large have a reliable, objective, and affordable source of information.The site includes a content management system; bookstore; and news, events, leadership, and products tools to manage the featured homepage content. -View-
April 5, 2010 --
|
||||