dennismonsewicz Posted March 27, 2009 Share Posted March 27, 2009 In mootools... is there a way to search the page for a particular ID of an element? So if it finds this ID then do something? Link to comment https://forums.phpfreaks.com/topic/151432-looking-for-id-of-element/ Share on other sites More sharing options...
Floydian Posted March 29, 2009 Share Posted March 29, 2009 var someElement = document.getElementById('id_to_look_for'); if (someElement) { alert('element found'); } else { alert('element not found'); } Yes, that isn't a mooway to do it, but it's basic javascript. I'm sure the mootools docs have their own method of doing this documented, if they have implemented something for this. I'm not a mooguy, so I couldn't tell ya. Hope that helps... Link to comment https://forums.phpfreaks.com/topic/151432-looking-for-id-of-element/#findComment-796121 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.