I am using RightJS (very similar to jQuery) on a site I'm working on. I am loading an element on the page with the result of a request like so:
var comp = $('completed_step');
if(comp != null) comp.load("/brew/completed_step");
This works but I am trying to find a way to only load the element if the result of the request for 'brew/current_step' is different than the value currently loaded in the element. Is there an easy way to accomplish that?