Problem with my initialize
<p>could someone help me with this please, for some reason on page load the buttons all seem to be in the "on" position even though i have one checkbox "checked" and the other not checked.</p>

<p>The problem seems to be in the if/then of the initialize_slideCheck(). I guess I am misusing the next()???</p>

<p>How can I target only the .checkboxTrigger that is wrapped in the same div as the checkbox?</p>

<p><a href="http://www.getstefan.com/learning/onoff.htm" rel="nofollow">PAGE LOCATED HERE</a>  </p>

<p>Any help appreciated!</p>

<pre>
<code>
$(document).ready(function(){

                function initialize_slideCheck(){
                    var slideCheck = $('.slideCheck');

                    slideCheck.wrap("");
                    slideCheck.after("");

                    slideCheck.attr('style', 'display:block;');

                    if(slideCheck.is(':checked')){
                        $(this).next(".checkboxTrigger").css("left", "-8px");
                    }else if(slideCheck.not(':checked')){
                        $(this).next(".checkboxTrigger").css("left", "-40px");
                    } 

                }

                initialize_slideCheck();

                $(".checkboxTrigger").click(function(){

                    var position = $(this).position().left;

                    if(position == -8){
                        $(this).animate({"left": "-40px"}, 200);
                        $(this).prev('.slideCheck').attr('checked', '');
                    }
                    else if(position == -40){
                        $(this).animate({"left": "-8px"}, 200);
                        $(this).prev('.slideCheck').attr('checked', 'checked');
                    }

                });

            });
</code>
</pre>
