liamoco Posted October 25, 2010 Share Posted October 25, 2010 Before I created the variable 'idElem' and just had 'document.getElementById' infront of everything it worked fine, but now nothing happens... $j(document).ready(function(){ var idElem = document.getElementById; //join chat button $j('#ext-join-chat-button').click(function(){ idElem('ext-chat-output-join').style.display = 'none'; idElem('ext-chat-output').style.display = 'block'; idElem('ext-chat-textarea').disabled = false; }); }); Thanks Link to comment https://forums.phpfreaks.com/topic/216787-why-does-this-not-work/ Share on other sites More sharing options...
nano Posted October 25, 2010 Share Posted October 25, 2010 If you're using jQuery, rather then play with document.getElementBy methods - why not just use jQuery selectors. Such as $('#ext-chat-output-join').hide() etc. Link to comment https://forums.phpfreaks.com/topic/216787-why-does-this-not-work/#findComment-1126218 Share on other sites More sharing options...
liamoco Posted October 25, 2010 Author Share Posted October 25, 2010 I dont want to use the jquery hide, because it slides if you know what I mean, I don't want that effect. Link to comment https://forums.phpfreaks.com/topic/216787-why-does-this-not-work/#findComment-1126223 Share on other sites More sharing options...
liamoco Posted October 25, 2010 Author Share Posted October 25, 2010 I dont want to use the jquery hide, because it slides if you know what I mean, I don't want that effect. My bad I was using $('#ext-chat-output-join').hide('fast') Link to comment https://forums.phpfreaks.com/topic/216787-why-does-this-not-work/#findComment-1126227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.