Hi, I’m trying to see if an element exists in my rjs:
exists = document.getElementById(“checkX”)
Something to that extent… how do I add that into the rjs?
Thanks
Hi, I’m trying to see if an element exists in my rjs:
exists = document.getElementById(“checkX”)
Something to that extent… how do I add that into the rjs?
Thanks
page << “exists = document.getElementById(“checkX”)”
Or u can do like
page << “if($(‘checkX’)){”
Do what u need here
page << “}”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs