Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function call() {
- function greatFunction(elem) {
- //do stuff
- }
- var textEditor1 = $('#cl1').find('textarea');
- textEditor1.on('focus change mousedown mouseout keyup mouseup', function () {
- greatFunction(this)
- });
- var textEditor2 = $('#cl2').find('textarea');
- textEditor2.on('focus change mousedown mouseout keyup mouseup', function () {
- greatFunction(this)
- });
- var textEditor3 = $('#cl3').find('textarea');
- textEditor3.on('focus change mousedown mouseout keyup mouseup', function () {
- greatFunction(this)
- });
- }
- <div id="cl1" class="cl active"><textarea id="chatTextarea" class="chatTextarea"></textarea></div>
- <div id="cl2" class="cl"><textarea id="chatTextarea" class="chatTextarea"></textarea></div>
- <div id="cl3" class="cl"><textarea id="chatTextarea" class="chatTextarea"></textarea></div>
Add Comment
Please, Sign In to add comment