Hi Gavin,
Instead of
<a
ex:href-subcontent="javascript:window.location.hash='{{.label}}';window.location.reload()">
try
<a href="javascript:{}" onclick="showItem(this);"
ex:itemID-content="value">
And add this Javascript function
function showItem(elmt) {
var itemID = Exhibit.getAttribute(elmt, "itemID");
Exhibit.UI.showItemInPopup(itemID, elmt, exhibit.getUIContext());
}
Cheers,
David
Gavin Robinson wrote:
> I'm finding using a hash of an item's label to display the lens dialog box
> for that item really useful. I just wondered if there's a function that I
> can call to display it without having to reload the page. At first I was
> making the links open a new window, then I added some javascript to change
> the href of the current window and reload it, but that's still a bit clunky
> as there's an inevitable delay while the whole page reloads. It would be
> great if I could just display the dialog without reloading.
>
> You can see an example at:
>
> http://www.4-lom.com/sandall/people-index.html
>
> I'm using the Exhibit for the index of people in a digital edition of a book
> about an army unit in the First World War. The whole site, including the
> JSON file, is generated by XSLT from a TEI XML file.
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general