“seekAttention” - jQuery plugin

Posted on Wednesday, September 17th, 2008
Post image ('“seekAttention” - jQuery plugin')

Recently I’ve been working on a brand new plugin for jQuery. It’s not quite finished and it’s in the "experimental" stages but I think it’s progressed enough for a release.

The new plugin is called "seekAttention" and allows any element on a page to seek the users attention… with added effects! I’ve been careful to take usability and customization into account with this plugin. It’s fully automated - it detects element size and builds an overlay to suit that element and you have a number of options so you get to decide how the plugin behaves.

It’s hard to explain exactly what it does so please have a look here: seekAttention jQuery plugin.

If you have any comments, questions or any bugs to raise please leave a comment on this blog post. As it’s an experimental plugin there are bound to be a few minor issues, especially with older browsers.

26 Responses to ““seekAttention” - jQuery plugin”

  1. Gravatar #1 :: Claude Says:

    Very nice James. By the way, the sample at the very bottom of the demo page doesn’t scroll to the top as expected. I am using FF 3.0.1 on Mac OS/X 10.5.5. It works just fine on Safari.

  2. Gravatar #2 :: James Says:

    @Claude, thanks :). As for the error, do you mind re-checking? I just made a tiny change by mistake but just fixed - you might of seen the error in FF before I made this fix. It’s a long shot but I would appreciate if you could give it one more try. :-)

  3. Gravatar #3 :: apaella Says:

    Cool!

  4. Gravatar #4 :: D. Carreira Says:

    Hey, nice plugin!

    Thanks for sharing, this could be useful to seek attention of users to something :D

    David Carreira

  5. Gravatar #5 :: James Says:

    Thanks Apaella and David! :)

  6. Gravatar #6 :: Evan Says:

    Very well done! This could be really useful for a tutorial on how to use a website or something like that!

  7. Gravatar #7 :: Matt Says:

    excellent work James, can’t wait to use this in a project

  8. Gravatar #8 :: Claude Says:

    James, sorry for taking so long. It doesn work with FF 3. Thanks.

  9. Gravatar #9 :: Claude Says:

    Sorry, I fat fingered that. It DOES work with FF. :)

  10. Gravatar #10 :: Mike Says:

    I think this idea is a great for usability. I think it will be greatly appreciated by many users.

    Great Job-

  11. Gravatar #11 :: James Says:

    @Evan, Matt and Mike - thanks, I am glad you all like it!

    @Claude, not to worry … Thanks for re-checking!

  12. Gravatar #12 :: Connor Zwick Says:

    Hey James,

    This is a terrific plug in. Nice concept!

  13. Gravatar #13 :: darrin Says:

    Having trouble getting this to work. linked to both jquery and seekattention scripts properly.

    Assigned id’s of target (to element to be isolated) and trigger (to link which will trigger effect):

    <a>Portfolio</a>

    and

    <a>Our new Portfolio!</a>

    and included this script block in the head:

    $('#trigger').click(function(){
            $('#target').seekAttention({
                paddingTop: 5,
                paddingBottom: 5,
                paddingLeft: 5,
                paddingRight: 5,
                opacity: 0.7
            });
            return false;
    });

    and its not working. any suggestions? do i need to initialize jquery or anything?

    Thanks!

  14. Gravatar #14 :: darrin Says:

    sorry my link code showed up as the links themselves! they are (without opening/closing braces):

    <a id="target" rel="nofollow">Portfolio</a>our new portfolio!</a>
  15. Gravatar #15 :: James Says:

    Her Darrin,
    It looks like you’ve got your IDs mixed up..?
    Try this:

    HTML:

    <a id="trigger" href="#" rel="nofollow">Our new Portfolio!</a>
    <div id="target">
        Some text...
    </div>

    JS:

    $('#trigger').click(function(){
            $('#target').seekAttention({
                paddingTop: 5,
                paddingBottom: 5,
                paddingLeft: 5,
                paddingRight: 5,
                opacity: 0.7
            });
            return false;
    });
  16. Gravatar #16 :: bony Says:

    Great plugin, thanks!
    But I have a small issue: then a page fades, background-color of form tag remains unfaded in IE6 :( It means there are more than one attentioned element on the page caused.

  17. Gravatar #17 :: bony Says:

    oops, it’s eaten the name of tag :) I meant “select”.

  18. Gravatar #18 :: TheUiGuy Says:

    I like it. I think you are on to something nice here. My first reaction (bare with me) was that this was a little obtrusive, but then I realized that it might be a tool for reading. I immediately thought “what if this was a tool for anyone, especially those that are impaired” to more easily read stories or articles. There is not much difference from the way you are positioning it, but I guess its more like a magnifying glass sort of tool. Either way, its pretty cool.

  19. Gravatar #19 :: redsquare Says:

    Nice work, just a little performance improvement. Where you reuse the same selector over and over e.g $(elem) & $(this) try setting them into a local var
    e.g.

    $elem = $(elem);

    Cheers

  20. Gravatar #20 :: tom Says:

    very nice plugin

  21. Gravatar #21 :: sb Says:

    Nice plugin.. I can think of a few good uses!

  22. Gravatar #22 :: fm Says:

    this plugin is great but i wont follow the specific area when user resize the browser.

  23. Gravatar #23 :: James Says:

    Thanks for the comments! :)

    @fm - I can see why’d you want to do that - the problem is that the plugin would basically have to re-written to accommodate that functionality, something I simply don’t haven’t got enough time to do at the moment.

    @redsquare, great tip! Thanks!

  24. Gravatar #24 :: saurabh shah Says:

    wow ! this is something really cool ! and new …

    Thnks for sharing…

  25. Gravatar #25 :: Ian Tearle Says:

    Cant seem to get the plugin working in IE7, at least it appears to be focusing on the element but the overlay is not appearing. Any ideas? I have tried altering the zindex.

  26. Gravatar #26 :: Ivo Says:

    Great plugin. Could it be triggered automaticly, let’s say onLoad, and let it unload after several seconds? That would be great to highlight new features on a site.

Leave a Response

Allowed elements include: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <em> <i> <q cite=""> <strike> <strong>.
Please wrap any multi-line code snippets in the <pre> element. (Characters are automatically escaped this way) - also you can specify the language within the lang attribute, e.g. <pre lang="php">echo 'hello';</pre>. (Available languages: "php", "javascript", "html4strict")