Название: JavaScript Отправлено: tFF от Апрель 07, 2005, 19:23:46 Динамическое изменение класса в JS
Восстанавливаю исходные данные по теме. Взято с официального сайта Мамбы (www.mamboserver.com (http://www.mamboserver.com)), уж очень понравилось мне их решение. javascript: Код: sfHover = function() { html: Код: <div id="nav"><ul> css: Код: div#nav li:hover, div#nav li.sfhover { Название: Вставка строки в позиции курсора с помощь Отправлено: tFF от Январь 13, 2007, 14:50:46 Вставка строки в позиции курсора с помощью JavaScript (источник (http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript))
Цитировать I discovered a real JavaScript gem in PHPMyAdmin this morning. They have code that inserts content into a <textarea> at the cursor position instead of just at the beginning/end of the content. This is something I thought wasn’t possible - I’m quite pleased I was wrong. I’ll be glad to see this code spread quickly to web forms that use buttons to aid in styling text and inserting image and link tags. WordPress and other blog and web forum packages would really benefit from this. (PHPMyAdmin is GPL, so any other GPL app should be able to use their code directly with attribution). Цитировать Here is a quick look at a generic version of the technique: Код: function insertAtCursor(myField, myValue) { Название: Drop Down Menus Отправлено: tFF от Август 14, 2007, 13:50:29 http://www.alistapart.com/articles/dropdowns
Название: Top 10 JS Functions Отправлено: tFF от Декабрь 24, 2009, 00:38:56 http://www.dustindiaz.com/top-ten-javascript/
Название: Re: JavaScript Отправлено: tFF от Ноябрь 06, 2010, 23:25:04 Javascript Closures (http://jibbering.com/faq/notes/closures/)
(var a=function() {..} and more) Also: http://bytes.com/topic/javascript/answers/582971-problem-dynamically-set-onclick Название: Re: JavaScript Отправлено: tFF от Ноябрь 07, 2010, 08:51:14 YUI Compressor (http://developer.yahoo.com/yui/compressor/) - JavaScript Yahoo Safe and Robust Compressor (Packer/Minifier)
|