| User | Post |
|
February 16, 2010
| Michael
| | |
|
|
|
Just wondering if it is possible to add an onclick event to the box drawn around the image (i.e. when the tag display is clicked, it can fire a JS event)
|
|
|
|
|
Post edited 12:29 pm – February 16, 2010 by admin
I'll add your request to TO DO list. In the feature TagHim will have a plugin with this feature.
|
|
|
|
|
Function is implemented and has been added TagHim 3.0.2 release.
|
|
|
February 16, 2010
| Michael
| | |
|
|
|
Just wondering how to use the onclick support you have added in. There doesn’t seem to be instructions for that or an example of it. I just need to be able to handle an onclick function on the rendered box.
|
|
|
|
|
Please take a look on second example http://taghim.com/taghim/v300/index.php
to enable OnClick function you need to use
taghim.setOption( 'onTagClick', function( oParams ){ alert( 'You clicked on tag' ); } );
replase alert( 'You clicked on tag' ); to any javacsript command
Instructions is located in manual/plugins/onclicktag.html folder
|
|
|
February 16, 2010
| Michael
| | |
|
|
|
Thanks for the info below, but what happens when I am displaying multiple tags on the one image. I was expecting that I would be able to add an onclick function call from the .addpositions function within the ShowTags select option. How am I able to add an onclick function to each tag?
|
|
|
|
|
Post edited 12:33 pm – February 16, 2010 by admin
it was no exact specification given. We include it to our yesterday release, but you can add an onclick function and call from the .addpositions function. I modify example slightly http://taghim.com/taghim/v300/index.php please check.
This line display unique coordinates for each tag:
taghim.setOption( 'onTagClick', function( oParams ){ alert( 'You clicked on tag.nTag coords is ' + oParams['X1'] + 'x' + oParams['Y1'] ); } );
|
|
|
February 16, 2010
| Michael
| | |
|
|
|
Post edited 12:35 pm – February 16, 2010 by Michael
Many thanks.
That should suffice for the moment, the X1 and Y1 positions are unique in my application of your product, so I can use them as a reference for what I am trying to achieve.
|
|