<a ex:href-content=".URL" onclick="myfunction(ex:content='.URL'); return false;">my text</a>
try ex:onclick instead of just onclick
that's what worked for me. fyi I am using v2.2.
<a ex:href-content=".URL" ex:onclick="myfunction(ex:content='.URL')">mytest</a>
<td><a data-ex-href-content=".URL" data-ex-onclick-content=".URL">my text</a></td>
<td><a data-ex-href-content=".URL"
data-ex-onclick-content="myfunction">my text</a></td>
Sorry, I sent last email incomplete:
<script>
$(document).bind("dataload.exhibit", function() {
$("a.myfunction").click(function(event) {
event.preventDefault();
<!-- rest of your function -->
});
});
</script>
<a data-ex-href-content=".URL" class="myfunction">mytest</a>
<script> $(document).bind("dataload.exhibit", function() { $("a.myfunction").click(function(event) { event.preventDefault(); console.log(data-ex-content=".MyField"); }); }); </script>Luis yes, but not nessarely the .url column. I prefer to understand a solution for a generic column .examplefield, and use its cell values as argument of a function inside a <a> tag.
Thank you
You received this message because you are subscribed to a topic in the Google Groups "SIMILE Widgets" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simile-widgets/fLtKmlmRIUo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simile-widget...@googlegroups.com.
You may want to explore the use of the "subcontent" feature on exhibit attributes:
http://simile-widgets.org/wiki/How_to_create_dynamic_URLs_using_ex:*-subcontent
Exhibit documentation is really quite a mess at the moment; it's scattered over many places and not up to date. I'd like to fix it but it's going to take a substantial effort, not piecemeal work. If someone is interested in tackling that I'd love to talk to them about how to do it.