hello :)
i would like to hook into the onclick event handler of the tiddlywiki and
access the parent container (wiki is loaded in one of its iframes)
so the parent container scrolls/tabs to the url related iframe and loads
the url in the target iframe instead of opening a new tab
is it possible?
where would i place the code? somewhere in boot.js?
e.g.:
$(function(){
//parent.$(parent.document).trigger('eventhandler');
document.onclick = function (e) {
e = e || window.event;
var element = e.target || e.srcElement;
if (element.tagName == 'A') {
//someFunction(element.href);
if(element.href.includes("http://somelinkiwantinsideotherframe"))
{
parent.loadIframe("otherframe", element.href);
return false; // prevent default action and stop event propagation
}
}
};
});
thanks for your help!
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/fe277425-83a8-4497-a309-a33fec50d563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.