image_share.js 562 B

1234567891011121314151617181920212223242526272829303132333435
  1. if (Meteor.isClient) {
  2. var img_data = [
  3. {
  4. img_src:"laptops.jpg",
  5. img_alt:"some laptops on a table"
  6. },
  7. {
  8. img_src:"bass.jpg",
  9. img_alt:"a bass player"
  10. },
  11. {
  12. img_src:"beard.jpg",
  13. img_alt:"some musicians with beards"
  14. },
  15. ];
  16. Template.images.helpers({images:img_data});
  17. Template.images.events({
  18. 'click .js-image':function(event){
  19. $(event.target).css("width", "50px");
  20. }
  21. });
  22. }
  23. if (Meteor.isServer) {
  24. console.log("I am the server");
  25. }
  26. console.log("where am I running");