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? Quote 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... Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.