Couldn’t Think Of a Clever Title

Software Ramblings

Archive for April, 2008

Context Menu jQuery Plugin

Posted by castever on April 10, 2008

My supervisor asked me today if I would be interested in being in charge of all the graphic design projects including marketing. I said yes right away, because I like to play around with the GIMP and create user interfaces. This will prove to be a great experience.

Anyway, because of this new assignment, I have begun looking around the web for useful tools and resources for graphic design and things related to that. Since I classify UI with graphic design, I looked at javascript toolkits and libraries. In a previous post I talked about my recent discovery of jQuery. Of course I had heard of it before. I even visited the site, but we were using PrototypeJs extensively in our eLearning platform that I didn’t bother to look too deep. My thinking has changed and I have taken a more pragmatic view than I had in my early days (ok last month).

So, today I found a very useful jQuery plugin: contextMenu plugin. I have played around with it a little and it looks like a clever piece of code and judos to Chris Domigan for coding it and sharing it with the world.

The plugin is easy enough to use, and he has placed plenty of examples on the site, so go look at it and enjoy.

Posted in Frameworks, JavaScript, jQuery | Tagged: , , , | Leave a Comment »

jQuery Is My New Best Friend

Posted by castever on April 1, 2008

I have been struggling for weeks upon weeks upon mind bending, agonizing weeks to solve what I would think to be a simple javascript problem. I needed a popup box to come up just left and center of another element. Well I searched through results provided by Google and Yahoo! and found a number of solutions that didn’t work for my particular situation. However, those examples provided a stepping stone for me to figure out how to position it where I wanted. The next problem was re-positioning the popup if it went beyond the top or bottom edge of the window viewport. This is where jQuery came to the rescue. If I had discovered this earlier, a lot of headache would have been prevented and I would have more hair.

jQuery has this: $(“#popup”).offset(), which returns the elements absolute top and left positions no matter where they are in the page and no matter how many elements they are nested in.

Thanks to smart people.

Posted in Code Libraries, Frameworks, JavaScript, Web Development | Tagged: , , , | 4 Comments »