Børre Stenseth

Popup

You can use itemBoxes as popup windows that appears on mouseenter on an element with class poptrigger

You must do the following on your page:

  • Define all the itemBoxes that should be involved
  • Identify alle the elements that should be triggers, and mark them with class poptrigger,
    and title="<the id of the associated itembox>" and an id.

When itemHolder . initElements() is run the connections are set up. Normally the popupbox appears some 100 ms after a mouseenter and collaps on ouseleave. You can change the delay and you can mark the involved itembox with kill and it will stay visible until you close it.

If you set the title of the itemBox to "?" the script will attempt to use text from the poptrigger as heaader of the box.

The involved itemboxes, which pops at "appeares" and "stay" above, are defined like this:

<div id="pop1" class="itembox expand  on style-popbox" title="?" 
   style="position:absolute;width:100px;display:none" >
  <div>OK you have entered. I will dissappear when you leave</div>
</div>
<div id="pop2" class="itembox expand drag on kill style-popbox" title="?" 
   style="position:absolute;width:100px;display:none" >
  <div>OK you can drag me and close me if you like</div>
</div>
Maintainance

B Stenseth, januar 2015