General javascript Question: Does this look right/safe

EQnoble

Well-known member
To you js wizards out there, specifically petaining to jQ....does this look OK to you. I replaced the api call in this example as to not give away what I am working on right now. This works currently but I would like to be sure it is a proper usage of and safe to use as far as not breaking any other jQ functionality. Thanks ahead of time.

Code:
<script>
$('.xxxXkush_wrap').each(function() {
    var toggle = $('.xxxXkushthingy', this), content = $('.xxxXThingyCorr', this);
    toggle.click(function(nothanks) {
        nothanks.preventDefault();
        $(content).toggle();
    });
});
</script>

CODE TAG EDITED: 8:19 pm est 7.8.11
 
What's it actually supposed to do? I can't actually follow what is supposed to be happening with jqAPIcall() - it doesn't look like it's calling a valid function.
 
Where does 'toggle' come from?
I edited it to reflect better what I was trying to do...

What's it actually supposed to do? I can't actually follow what is supposed to be happening with jqAPIcall() - it doesn't look like it's calling a valid function.
I literally put that there to hide what I was doing...it really doesn't exist you are right:-)

I have edited that code snippet to reflect better it's purpose.
 
Back
Top Bottom