Guest User

Untitled

a guest
May 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. ...
  2.  
  3. ,imagetool: function(settings) {
  4. var foo = $.extend({}, defaultSettings, settings);
  5. settings = $.extend({}, defaultSettings, settings);
  6.  
  7. return this.each(function() {
  8. var image = $(this);
  9. image.css({display: "none"});
  10. image.load(function() {
  11. alert("image is " + this.width + " by " + this.height + " pixels in size."); //this don't work on first page load but does on relaod
  12. settings.imageWidth = this.width;
  13. settings.imageHeight = this.height;
  14. $(this).setup(settings);
  15. });
  16. }); // end this.each
  17. }
  18. ...
  19.  
  20. so image doesn't appear on image load, but does on reload :/
Add Comment
Please, Sign In to add comment