[jQuery] Re: Hide elements cleanly, not appear then disappear

2009-06-18 Thread heldtogether

Thanks, this is exactly what I was looking for.

On Jun 17, 7:30 pm, Ricardo  wrote:
> If a page is small enough, I usually will hide them in javascript, on $
> (document).ready():
>
> myEl = $('#myEl').hide();
> myEl.each(...);
>
> A good alternative is to add a class to the body/html when javascript
> is on, see 
> here:http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-uns...
>
> On Jun 17, 6:37 am, heldtogether  wrote:
>
> > hey, i want to hide some elements on my site, but don't want to make
> > these inaccessible for users without javascript enabled. Some users
> > are complaining about being able to see that element for a split
> > second before the page has finished loading and the element is hidden.
> > Is there a way in which I can hide the elements right from the start,
> > without using css to hide it completely?


[jQuery] Hide elements cleanly, not appear then disappear

2009-06-17 Thread heldtogether

hey, i want to hide some elements on my site, but don't want to make
these inaccessible for users without javascript enabled. Some users
are complaining about being able to see that element for a split
second before the page has finished loading and the element is hidden.
Is there a way in which I can hide the elements right from the start,
without using css to hide it completely?


[jQuery] Re: How to check if jquery is working?

2009-05-21 Thread heldtogether

Ok, thanks for the help people. I had to move the jquery.js into a
subdirectory and link from there, and it now seems to be working.

On May 16, 2:43 pm, Jim D  wrote:
> You can also check to see if $ is a function.  If the jQuery script
> loaded properly, that should return true
>
> On May 15, 2:16 pm, James  wrote:
>
> > Try using tools like the Web Development toolbar add-on for Firefox to
> > debug. Under "Information > View Javascript", you can view all of the
> > Javascript that is loaded on the page, such as maybe other Javascript
> > libraries that are overriding the $ variable.
> > This will help you see what Javascript is on your page, and whether
> > they are linked correctly or not.
>
> > Additionally, also use the Firebug add-on to check whether your
> > Javascript is spitting out any errors.
>
> > Try also simplifying your code to something like:
>
> > jQuery(document).ready(function(){
> >      alert('test');
>
> > });
>
> > On May 15, 6:00 am, Charlie  wrote:
>
> > > is jquery.js included on page and is it loading (ie is path valid to 
> > > jquery.js)?
> > > heldtogether wrote:Hi, I want to try incorporate jquery in my site, but 
> > > I'm having some problems. The site is drawn together from various files 
> > > in PHP. I have added the jquery script which I would expect to work fine 
> > > regardless of the PHPness earlier because it is a client side script. 
> > > Unfortunately nothing happens. If I save the page directly to my desktop 
> > > then the script works fine, so I think there must be some problems with 
> > > the dynamic pages. Does anyone have any idea why this might be occuring? 
> > > The following is what gets put onto the page in the header if I view 
> > > source.   > > type="text/javascript"> $(document).ready(function(){ $("<p>Hello 
> > > world!</p>").appendTo("body"); $("#onlineresources").hide(); 
> > > $("#onlineresourcesbutton").click(function(){ 
> > > $("#onlineresources").slideDown("slow"); return false; }); });  
> > > Thanks, Josh


[jQuery] How to check if jquery is working?

2009-05-15 Thread heldtogether

Hi,

I want to try incorporate jquery in my site, but I'm having some
problems. The site is drawn together from various files in PHP. I have
added the jquery script which I would expect to work fine regardless
of the PHPness earlier because it is a client side script.
Unfortunately nothing happens. If I save the page directly to my
desktop then the script works fine, so I think there must be some
problems with the dynamic pages. Does anyone have any idea why this
might be occuring?

The following is what gets put onto the page in the header if I view
source.



$(document).ready(function(){
$("

Hello world!

").appendTo("body"); $("#onlineresources").hide(); $("#onlineresourcesbutton").click(function(){ $("#onlineresources").slideDown("slow"); return false; }); }); Thanks, Josh