jQuery Gradient Plugin

jQuery Gradient Plugin

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
11,856 views

Adds a dynamically created configurable gradient to the background of an element without the use of images.

Above you’ll see a screenshot of the network graph of my god repository (click it for the real deal). On the left hand side is a list of GitHub users. Across from each user is drawn a graph of commits. Since I’ve asked for the graph to be drawn with me (mojombo) as the root, every commit on every branch that I currently have in my repository (mojombo/god) will be graphed across from my name. If you look at the second user in the list (Bertg), you’ll see that only commits that appear in his repository (Bertg/god) but not mine are drawn across from him. The third user (kevinclark) has commits that appear in neither my repo nor Bertg’s repo. And so on.

When you look at the graph you are seeing every commit on every branch of every repository that belongs to a network. But you are seeing each commit only once. Let that sink in for a second. I find that many coders are so used to a centralized SCM that they miss the fact that our Graph Visualizer is actually showing and connecting disparate repositories. Git makes this possible and once it hits you, it can change everything.

Think of it like this. If I draw the graph with myself as root, then the graph shows a sort of to-do list of code that I haven’t pulled into my repo yet. When I want to catch up on what the community has been doing in their forks of my repo, I can hit up the graph and see immediately what others have been up to. If I were to pull in Bertg’s changes, the next time I see the graph, Bertg will no longer be shown at all because he will no longer have any commits that I do not. Keep thinking to-do list and you’ll understand the graph.

This method of drawing the graph may seem odd at first. If both Alice and I contribute to merb-core and at some point Alice pulls my commits into her repo, then I may not be shown on the network graph at all (if the graph ordered her before me). My commits would have already been drawn in her repo. It is important to realize that the graph is about code not ego. My code may be in my repository and yours and many others. Our individual repos are simply vehicles for introducing our code to the world. If we learn to let go of our code a little bit, we are rewarded ten-fold by what the community or our coworkers will do with that code.

You can move around the graph by clicking and dragging it with your mouse. If you click in the graph, then you can use the arrow keys or vim movement keys (hjkl). Hold down the shift key while hitting left or right and you’ll go to the beginning/end of the graph. Press t to show/hide the tag markers. Hover over a commit for details about it. Click on a commit to be taken to that commit in a new window (makes it easy to come back to the graph without losing your place). Click a username to redraw the graph with that person as the root.

Demo: http://www.ajaxupdates.com/gradient_demo/
Download: http://www.ajaxupdates.com/jquery_gradient.zip
Source: http://plugins.jquery.com/project/gradient

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. jQuery Binary Tree Plugin This script allows you to, with just one call, rearrange...
  2. Form Wizard using Jquery Plugin The form wizard plugin is a plugin based on...
  3. Super simple javascript accordion jQuery plugin I’ve been working professionally with the web since 2002. Back...

Do you like this post?

Email:     

Tags: , , , , , , , , , , , , , , ,

10 Comments »

  1. avatar comment-top

    every link i click that says demo, goes to a list of all the plugins you have made.

    http://brandonaaron.net/code

    the link here that says demo i tried,
    link on github i tried, link on jquery site i tried. none go to a demo

    comment-bottom
  2. avatar comment-top

    The link of the Demo goes to Demos index where you can check different demos.

    and other all links are active too, please let me know if any other…

    comment-bottom
  3. avatar comment-top

    I’m afraid I’m with B. Moore – I can’t see how to find the demo.

    The demo link takes you to a list of all your plugins, including Gradient, but only one plugin has a demo link and that’s not Gradient. Gradient only has links for Support and Source. Huh?

    No disrespect, but that’s pretty bad usability wise. You might have the greatest plugin in the world, but people won’t use it because they can’t find the demo!

    I hope you can make this clearer as the plugin sounds great.

    comment-bottom
  4. avatar comment-top

    I apologize for this.

    Demo link is updated and also download link too (now have all the files needed)

    here is new
    Demo Link: http://www.ajaxupdates.com/gradient_demo/

    Download Link: http://www.ajaxupdates.com/jquery_gradient.zip

    comment-bottom
  5. avatar comment-top

    Okay – thanks for adding the demo link. Now I can say that this looks fantastic! Thanks!

    comment-bottom
  6. avatar comment-top

    You are welcome

    comment-bottom
  7. avatar
    Arik Beremzon Says:
    July 28th, 2009 at 2:46 am
    comment-top

    Would this technique be more optimized than using a .png? I think I am going to stick to png’s as I intend to use it in static elements only and I can’t risk a gradient not showing if a user turns of his/her JS.

    Thanks for the insight though.

    comment-bottom
  8. avatar comment-top

    .png are the images that takes time to load and off course space too to store and bandwidth too,

    and 99.999999999% browsers are javascript enabled, so fee free to use it, rest it’s the choice of the developer what he/she chose.

    comment-bottom
  9. avatar comment-top

    [...] Shared jQuery Gradient Plugin [...]

    comment-bottom
  10. avatar comment-top

    rounded{-moz-border-radius: 15px; -webkit-border-radius: 15px;}

    adds round corners which jQuery Gradient Plugin doesn’t respect; -the gradient corners are square. Am I not correct?

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG