Skip to content

Instantly share code, notes, and snippets.

@justinpeterman
Created October 12, 2011 06:09
Show Gist options
  • Save justinpeterman/1280418 to your computer and use it in GitHub Desktop.
Save justinpeterman/1280418 to your computer and use it in GitHub Desktop.
Dynamic image in Jo
//init new element
new joHeaderImg("http://scdev.gizmo.com/images/pepsi_faceoff_bold.png","50","50")
//another example. too basic?
var joHeaderImg = function(url, width, height) {
var node = joDOM.create("img", {
className: "some-default-styles",
width: width + 'px',
height: height + 'px'
});
if (node)
node.setAttribute("src", url);
return node;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment