$(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/