Img Notes – jQuery plugin

UPDATE : A new version of this plugin has been released and can be found here

This was another one of ‘want it now()’ things. A simple way to display notes over images when you roll your mouse over the image – you got it right! Flickr has that…

There are a couple of similar javascript solutions out there but I wanted something using jQuery and simple. Well using jQuery and simple in same sentence is kind of redundant but if you see the plugin code you will realize what I mean.

Take a look at the demo

Usage:

#1 The plugin expects the notes data to be in in json fomat. To quote from the example

javascript
< view plain text >
  1. notes = [{"x1":"10","y1":"10","height":"150","width":"50","note":"This is note one"}, {"x1":"25","y1":"25","height":"70","width":"80","note":"<strong>This</strong> is a new note This is another note This is a new note"}];

To quickly go over the properties
x1 – The X co-ordinate of the top-left corner of the note area
y1 – The Y co-ordinate of the top-left corner of the note area
height -
width – self explanatory
note – The text of the note, it can have html but I recommend you keep it simple.

x1 and y1 are relative the position of the image on which the notes will be displayed, so when you move the image around in your page the the notes will move with it.

#2 The javascript code to initialize the notes

javascript
< view plain text >
  1. $(window).load(function () {
  2. $('#id_of_image').imgNotes(); //If your notes data is is not named notes pass it
  3. });

The zip file has an example

Download : here
Known issues: Internet Explorer has a buggy behavior while displaying the text of notes, any one having a solution please post a comment.Fixed

About Tarique Sani

Dr. Tarique Sani is a pediatrician and forensic expert by education. He is a PHP programmer of 'wrote the book' caliber and has to his credit several very popular open source as well as commercial PHP projects. He leads a team of dynamic programmers at SANIsoft who have in-depth understanding of Web development tools and usability practices with strong developmental skills in PHP, MySQL/PostgreSQL, HTML, DHTML, Javascript, and Linux/Apache

49 Responses to Img Notes – jQuery plugin

  1. Torsten May 26, 2008 at 6:23 pm #

    IE needs some kind of background for this hover-thing. you could add a transparent gif or png as background-image to .note.
    this should work.

    besides that, great work!

  2. Tarique Sani May 27, 2008 at 11:23 am #

    Thanks Torsten, your solution seems to work, have updated the zip

  3. a July 16, 2008 at 9:46 am #

    very good

  4. nobird October 14, 2008 at 8:27 pm #

    great work!

  5. poidi October 16, 2008 at 5:14 pm #

    Bugreport + Bugfix:

    when multiple notes overlap – some note is displayed behind the noteborder of another notearea:

    fix:
    jquery.imgnotes-0.1.js
    line 42
    from: $(this).css(“z-index”, 10000);
    to: $(this).next(‘.notep’).css(“z-index”, 10000);

    and
    line 47
    from:$(this).css(“z-index”, 0);
    to: $(this).next(‘.notep’).css(“z-index”, 0);

  6. Tarique Sani October 16, 2008 at 5:25 pm #

    @poidi Thanks a lot for the report and more importantly for the fix :)

    Will include it in the download.

  7. Marco October 28, 2008 at 3:15 pm #

    Hey Tarique,

    awesome work! Thanks for sharing!

    What about an improvement, with a button that allows you to select an area and create a new note? I was looking all over the web for a jquery script like that and thats the only thing thats missing in your script!

    Greets

    Marco

  8. Thejesh GN November 3, 2008 at 12:54 pm #

    cool tip. I will try to use it.

  9. Jasper Kennis December 5, 2008 at 8:27 pm #

    Hey,

    I’m having trouble reading the post data when submitting, how do I fetch it?

    Tnx,

    Jasper

  10. Phuc December 11, 2008 at 8:30 am #

    Hi Tarique,

    Wonderful script. There’s a small problem. I don’t know if you realize if one note is big enough to cover all the others, these smaller notes will not be accessible (when hovered you can only see the content of the big note that covers everything)

  11. Lee January 13, 2009 at 1:04 am #

    fyi, on resize of the window the notes move from their previous place.. not sure if you meant that or not..

  12. 123doing June 10, 2010 at 8:31 am #

    It’s very good.
    I like this.
    Thanks for share.
    And I wrote something to introduce this project for my readers.
    You can find the post about this in my website.
    If something is wrong,pls figure it out.thanks.

  13. Heshan July 19, 2011 at 10:29 pm #

    Hi, first of all GREAT WORK!!!

    I would like to know something though… I downloaded this source code and am in the process of modifying to better suite my needs.

    I need show the notes that have been tagged to this image at the bottom, and when the user hovers over a given tag, i want the square of that particular tag to be appear.

    Could let me know where I should edit in order to make this possible?

    • Tarique Sani July 20, 2011 at 6:04 pm #

      This is a very simple plugin. Your best bet is to write a separate plugin to take the data and create necessary links, feel free to copy the code which shows and hides the notes from my plugin.

      • Heshan July 20, 2011 at 6:29 pm #

        Hi, first of all thanks for the reply.

        I actually got the data to appear at the bottom in the form of links. Now my problem is getting the relevant square to appear on the image when I hover over link.

        What is the function that I should pass the x1 y1 width and height values in order for the square to appear?

        • Tarique Sani July 20, 2011 at 6:53 pm #

          Well, first you will need all the notes (which are actually divs) to have unique IDs, once that is done then the hover of the links below the picture will need to call the show and hide function with that unique ID being passed, of course then you will have to modify the show and hide to use the ID passed but that is very simple. Do release the plugin modifications once you are done :-)

  14. Heshan July 20, 2011 at 9:36 pm #

    Right! thanks for the feedback! And definitely will do :)

  15. sukh November 17, 2011 at 2:26 pm #

    hi,

    Thanks for this script, it works wonderful! but i want to fixed the size of selection box, could you please direct me that how i make this change.

    No doubt its good feature but my requirement is for fixed size.

    Thanks

    • Tarique Sani November 27, 2011 at 10:59 am #

      The img notes script is just for displaying the notes – if you are referring to the demo then that uses another script from another author – see the source….

Trackbacks/Pingbacks

  1. 20 Amazing jQuery Plugins and 65 Excellent jQuery Resources | Speckyboy - Wordpress and Design - July 21, 2008

    [...] 7. Img Notes [...]

  2. Enlaces de la semana 5 — Viciao2k3 - August 18, 2008

    [...] jquery, img notes [...]

  3. A study in Ajax Web trends. What are the best Free Ajax Resources? (70 of the Best Ajax Resources). | Speckyboy - Wordpress and Design - August 19, 2008

    [...] 9. Img Notes [...]

  4. Visualizzare note sulle immagini come Flickr - 3 sul Blog - Tech, Fun e Web 2.0 - August 20, 2008

    [...] L’effetto è molto particolare ed offre una particolare interazione e profondità tra voi ed i vostri visitatori, per chiunque volesse provare questo plugin, andate su SANisoft. [...]

  5. 点点开源项目大全 » Blog Archive » 【AjaxTooltip】Img Notes - August 31, 2008

    [...] 官方网站:Img Notes [...]

  6. Camondongs - Desenvolvimento Web - September 12, 2008

    [...] o plugin Img Notes você pode mapear partes de uma imagem e inserir notas, para ver um exemplo clique [...]

  7. 70 of the Best Ajax Resources - - October 6, 2008

    [...] 9. Img Notes [...]

  8. Boost My Code » CSS Javascript Tag jQuery » Tag an image with jQuery - January 2, 2009

    [...] | Download Posted in Category : CSS, Javascript, Tag, jQuery on January 1st , 2009Tags: add a note over an [...]

  9. 10 fantastiska AJAX-script du inte vill missa! | Designskolan - January 2, 2009

    [...] 6. Bild-taggning som på Facebook [...]

  10. Img Notes v0.2 - a couple of bug fixes and some more at SANIsoft - PHP for E Biz - January 23, 2009

    [...] the publication of the first version of Img Notes jquery plugin there was very little that needed to be done and the plugin itself has had more than 10,000 [...]

  11. 70 of the Best Ajax Resources | CSS Resources - January 29, 2009

    [...] 9. Img Notes [...]

  12. itch and the jQuery scratch « null pointers … - March 12, 2009

    [...] for the first time, I could cookup a working protoype in around 2hrs using jQuery plugins like this, this and [...]

  13. 20 Amazing jQuery Plugins and 65 Excellent jQuery Resources | 77even - May 11, 2009

    [...] 7. Img Notes [...]

  14. Image Notes | jQuery plugin | peopleofdesign.net | Современник - June 28, 2009

    [...] источник [...]

  15. Amazing jquery plugins | psd2css - August 18, 2009

    [...] 7. Img Notes [...]

  16. 天亿博客 » 超强1000个jquery极品插件!(连载中。。。。最近更新20090710) - September 22, 2009

    [...] Img Notes FancyZoom FancyZoom采用缩放效果来展示图片或任意HTML页面,不需要另外开启页面来载入图片,其效果在Apple Mac的官方网站中也有。 [...]

  17. jQuery常用WEB控件第五弹 | CKSKY - November 5, 2009

    [...] Img Notes [...]

  18. JSSAY » 1000个JQuery极品插件(连载中…) - November 6, 2009

    [...] Img Notes FancyZoom FancyZoom采用缩放效果来展示图片或任意HTML页面,不需要另外开启页面来载入图片,其效果在Apple Mac的官方网站中也有。 [...]

  19. jQuery极品插件 | 花花世界 - November 25, 2009

    [...] Img Notes FancyZoom FancyZoom采用缩放效果来展示图片或任意HTML页面,不需要另外开启页面来载入图片,其效果在Apple Mac的官方网站中也有。 [...]

  20. 20 Amazing jQuery Plugins : swapnil - February 8, 2010

    [...] 7. Img Notes [...]

  21. 超强1000个jquery极品插件! | 对酒当歌WEB开发 - April 12, 2010

    [...] Img Notes FancyZoom FancyZoom采用缩放效果来展示图片或任意HTML页面,不需要另外开启页面来载入图片,其效果在Apple Mac的官方网站中也有。 [...]

  22. Img Notes 开源项目 - Ajax代码大全 - Java开源项目 - 图片管理 - ajax图片展示工具 - Img-Notes - Java免费软件 - 开源网 - June 10, 2010

    [...] Img Notes 项目主页 | Img Notes 项目下载 | Img Notes 中文支持 [...]

  23. Jquery13 - September 5, 2010

    [...] 7. Img Notes [...]

  24. Image Annotation Plugins for WordPress | Jesse Pearlman Karlsberg - December 16, 2010

    [...] English, and this Google Translate version of the plugin page) is based on a jQuery plugin called img notes (which makes use of another more general jQuery plugin called imgAreaSelect). The plugin adds an [...]

  25. 20 Amazing jQuery Plugins and 65 Excellent jQuery Resources - April 8, 2011

    [...] yet unobtrusive. Demo: Humanized Messages Demo. Download: Humanized Messages Download.7. Img NotesDescription: A simple way to display notes over images when you roll your mouse over the image. This [...]

  26. jquery图片展示插件(转) | 西街口 - April 10, 2011

    [...] Img Notes [...]

  27. knspr-imgnote review, discussions, does it work, and ratings on Loadwp.com | Loadwp.com - August 17, 2011

    [...] the imgAreaSelect jQuery plugin by Michal Wojciechowski and is based on the imgnotes jQuery plugin by Dr. Tarique [...]

  28. 100+ Excellentes Recursos jQuery | zebit | Chile - September 10, 2011

    [...] Img Notes [...]

  29. 超强的jquery极品插件–色彩选择器类/ 右键菜单类/ 图片新闻flash展示类 « 得看看-精品阅读|速查|分享 - July 21, 2012

    [...] Img Notes  FancyZoom FancyZoom采用缩放效果来展示图片或任意HTML页面,不需要另外开启页面来载入图片,其效果在Apple Mac的官方网站中也有。 [...]

  30. 100个优秀的jquery资源 - March 12, 2013

    [...] Img Notes [...]

Leave a Reply