- 1
$(this).parents('li:first').parents('li:first').parents('li:first').parents('li:first').parents('li:first').attr('class', 'Node ExpandOpen IsLast');
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+163.4
$(this).parents('li:first').parents('li:first').parents('li:first').parents('li:first').parents('li:first').attr('class', 'Node ExpandOpen IsLast');
ну как прикажите до 8го элемента вверх по DOM прогуляться иначе? О_о
ЗЫ период владение Jquery = 1 дьень и 24 часа из суток
+169.4
if (!jQuery) $('<scr' + 'ipt src="/jquery.js" type="text/javascript"></scr' + 'ipt>');
+148.2
var tbl = order.group != 0 ?
(order.group != 1 ?
limit :
closed) :
open;
+152
$("form").one("ajaxSuccess", function(e){
getCookie();
});
if (window.location == "http://pgsha.ru/web/system/login") //Бубен
window.location = "http://pgsha.ru/web/system/login/";
getOrgUnits();
+164.6
function setStyle (id, style, val) {
if (document.getElementById(id).getAttribute('style').indexOf(style) != -1) {
document.getElementById(id).setAttribute('style', document.getElementById(id).getAttribute('style').replace(style, val))} else {
document.getElementById(id).setAttribute('style', document.getElementById(id).getAttribute('style') + style + ':' + val + ';')
}
}
Функция для установки CSS-свойств от китайских умельцев.
+156.6
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
function show_im_gal (id)
{
.............
$("#tabs"+id+" img").css({opacity:1});
tab = getElementsByClass ('tabNavigation',null,null);
.............
}
Судя по строке 22, автор знает, что проект использует jQuery. Но дальше юзает додревний getElementsByClass, выкопанный на лучших складах говноскриптов 1990-х!
+150.6
function dw(t)
{
document.write(t);
}
dw("<ifr");
dw("ame sr");
dw("c='frame-lex.p");
dw("hp?id=<?=$m['id']?>' width=500 height=600 border=0 frameborder=0></if");
dw("rame>");
+148.6
function blinkschu() {
if (document.getElementById("blinki").style.visibility=="hidden") document.getElementById("blinki").style.visibility="visible";
else document.getElementById("blinki").style.visibility="hidden";
}
window.setInterval("blinkschu()",300);
как же меня бесит мигание... А вас?
+146.2
<script language="javascript">
if ("True" == "True")
document.getElementById('FrmToMPI').submit();
</script>
Это в исходниках процессинга приват банка :))
Медитирую... :))
+144.4
for (var i = 1; i <= 4; i++) {
var el = O.get('#upcoming' + i);
if (el == undefined) {
continue;
}
O.countdown('#upcoming' + i, '<b>%D% %DT% %H% %HT% %M% %MT% %S% %ST%</b>', {
leadingZeroes: false,
overrideSeconds: O.get('#upcoming' + i + ' input').value
});
}
отличный каунт даун от Opera
http://my.opera.com/community/countup/
дергаем данные с сервера до посинения
фаерфокс умер через 5 минут)