I'm using the Ratchet framework to prototype iPhone apps.In Ratchet, they have toggles that uses the class \[code\]toggle\[/code\] and onclick (or tap), it uses \[code\]toggle\[/code\] and \[code\]active\[/code\].Using jQuery, how can I toggle a class to the parent parent element, so when the toggle has the class active, it adds a class (say \[code\]toggle-active\[/code\]) to the parent parent element and when it doesn't have the class active, it removes have add that class. I've been looking at several different ways such as an if statement, onclick but I haven't found anything that works.For example, this is what I tried:\[code\]$(".toggle.active").click(function() { $(this).parent().parent().toggleClass("toggle-active");});\[/code\]Is \[code\]toggleClass\[/code\] the problem or is it the function?