OnLoad opening a cerbox

24 views
Skip to first unread message

Elena Blanco

unread,
Jul 7, 2014, 12:48:00 PM7/7/14
to cer...@googlegroups.com
I am looking on how to open a cerabox on page load - I need to prompt the user to sign up for email subscription prior being able to browse the site.

Can you point me in the right direction? thank you!

Elena

Jim Lind

unread,
Jul 7, 2014, 12:55:56 PM7/7/14
to cer...@googlegroups.com
CeraBox was designed to be opened when an anchor is clicked so we have a hidden anchor that has the "click" event triggered via JS on load.
--
You received this message because you are subscribed to the Google Groups "CeraBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerabox+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chad Meyers

unread,
Jul 7, 2014, 9:36:42 PM7/7/14
to cer...@googlegroups.com
exactly as Jim said. I do the same thing here http://www.jessyspizza.ca/menu.php

When the session variable for location is not set, I include a file that contains this code;

<div id="noShow">
 <a href="#locPromptBox" id="locPromptBoxLink" style="display: none;"></a>
  <div id="locPromptBox" class="locPromptBox" data-type="inline">
   <p>Please select your Province</p>
   <form action="" method="post" enctype="multipart/form-data" name="getLoc" target="_top" id="getLoc">
    <p>
     <select name="location" id="location">
      <option value="ns">Nova Scotia</option>
      <option value="nb">New Brunswick</option>
     </select>
    </p>
    <p>
    <input type="checkbox" name="remember" id="remember" />
    <label for="remember">Remember my choice</label>
    (requires cookies)</p>
    <p>
      <input type="submit" name="submit" id="button" value=" Go " />
    </p>
   </form>
  </div>
</div>

<script type="text/javascript">
//<![CDATA[
$('locPromptBoxLink').cerabox({
group: false,
displayTitle: false,
fixedPosition: true,
clickToCloseOverlay: false,
});
$('locPromptBoxLink').fireEvent('click', '', 100)
//]]>
</script>
Reply all
Reply to author
Forward
0 new messages