That is exactly what the $(document).ready(function () is for ;-)

When the DOM is loaded - do this stuff to it

Cheers

On Sun, 2012-12-16 at 13:23 -0600, John M Bliss wrote:

> This seems to work but looks clunky to me. Better solution(s)?
> 
> .mymenuclass {
> visibility: hidden;
> }
> 
> <head>
>     <script>
> $(document).ready(function () {
> $( "#mymenu" ).hide();
> $( "#mymenu" ).css("visibility", "visible");
> });
>     </script>
> </head>
> 
> 
> On Sun, Dec 16, 2012 at 1:09 PM, John M Bliss <bliss.j...@gmail.com> wrote:
> 
> > Hi! I'm using jquery to show/hide div containing primary nav. The problem
> > is that, on "heavier" pages, the code below does not perform the initial,
> > "ready" hide fast enough so you can see the nav flash on before it's
> > hidden. What's the best way to address this issue?
> >
> > <head>
> >     <script>
> > $(document).ready(function () {
> > $( "#mymenu" ).hide();
> >  });
> >     </script>
> > </head>
> >
> > <div id="mymenu" class="mymenuclass" onmouseover="$( '#mymenu' ).show();"
> > onmouseout="$( '#mymenu' ).hide();">
> > the menu
> > </div>
> >
> > --
> > John Bliss - http://about.me/jbliss
> >
> >
> 
> 


-- 
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc. - makers of FACTS™
phone: 250.480.0642
cell: 250.920.8830
e-mail: br...@electricedgesystems.com
web: www.electricedgesystems.com and www.fisheryfacts.com 


________________________________________________________________________

Please consider the environment before printing this e-mail

-----CONFIDENTIALITY------
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353500
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to