问题
I need help to make a table which will have a cells as product thumbnails and by hovering or clicking on this small image, I want to show the pop up with big image of product.
(Right now it works as hyperlink, but it is not enough)
I know we have a few ways how to run function right now:
- from a custom spreadsheet function
- from a trigger (from spreadsheet like on open, on edit or on form submit, or Time driven)
- from a custom menu (which must be created by e.g. on open)
- from a custom user interface (which must be created by e.g. on open)
- from a drawing or chart
- from the script editor
Is there any way how we can trigger event like hover or click on cell in table?
I have a few ideas right now :
- Some how place big image in comment or note in cell.
- Make a custom function which will return image/chart/drawing as a value and apply function for this image/chart/drawing. But seems we should have much more easy way to do it =)
I know this is a similar question as: This and This but they are old and google has made an API update since December 11, 2014.
回答1:
- Add an Image ( Insert > Image ) to your sheet.
- Resize and Move it to fit your needs.
- Click the drop-down symbol in the upper right corner of the image.
- Select 'Assign Script'
- Enter the name of the script you wish to run.
来源:https://stackoverflow.com/questions/37064117/how-to-run-custom-function-by-hovering-or-clicking-on-cell-in-google-spreadsheet