The "ready" function does that. It works on the page (for most
browsers) before the page is displayed.
Karl Rudd
On 2/21/07, Gorkfu <[EMAIL PROTECTED]> wrote:
>
> I understand the ready function and have looked over the documentation. Maybe
> I wasn't clear enough in my last post and I'm sorry if that's the case.
>
> To explain a little further basically I have a php document i made that will
> load the checkoxes as checked or not checked according to how the data is
> saved in mysql. I wanted the script to hide checkboxes that are checked as
> the page is loading.
>
> So basically I want the script to do it's thing while the page is loading,
> not after it has loaded, but from what I understand that is not possible
> with javascript, unless I'm missing something.
>
>
>
> Karl Rudd wrote:
> >
> > $(document).ready( function() {
> > /* Stuff to do when the page has loaded */
> > });
> >
> > You might like to take a quick look over the documentation for jQuery.
> > A good place to start is:
> >
> > http://docs.jquery.com/How_jQuery_Works
> >
> > It'll make your jQuery life a lot easier :).
> >
> > Karl Rudd
> >
> > On 2/21/07, Gorkfu <[EMAIL PROTECTED]> wrote:
> >>
> >> Thx for all the help everyone. I tried empty before also, it completely
> >> removes the <li> and blank append doesn't remove a prior append. I'm
> >> stuck
> >> figuring this one out.
> >>
> >> Also, another thing I ran across is that I would like the javascript to
> >> run
> >> when the page loads, if possible. I checked out the load and bind but
> >> don't
> >> seam to work for what I want.
> >>
> >>
> >> Olaf wrote:
> >> >
> >> > Gorkfu schrieb:
> >> >> I tried to set up an append text and remove text to a checkbox that is
> >> >> clicked. I tried the following it works for append perfectly but the
> >> >> remove
> >> >> manipulation freezes firefox and explorer.
> >> >
> >> > Or so:
> >> >
> >> > $(document).ready(function(){
> >> > $("[EMAIL PROTECTED]'checkbox']").click(function(){
> >> > if ($(this).is(":checked")){
> >> > $(this).siblings("ul").hide("normal");
> >> > $(this).parent("li").append("Complete!");
> >> > } else {
> >> > $(this).siblings("ul").show("normal");
> >> > $(this).parent("li").empty();
> >> > }
> >> > });
> >> > });
> >> >
> >> >
> >> > --
> >> > Viele Grüße, Olaf
> >> >
> >> > -------------------------------
> >> > [EMAIL PROTECTED]
> >> > http://olaf-bosch.de
> >> > www.akitafreund.de
> >> > -------------------------------
> >> >
> >> > _______________________________________________
> >> > jQuery mailing list
> >> > [email protected]
> >> > http://jquery.com/discuss/
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9074931
> >> Sent from the JQuery mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> jQuery mailing list
> >> [email protected]
> >> http://jquery.com/discuss/
> >>
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9075142
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/