Jump to content

es131245

Members
  • Posts

    209
  • Joined

  • Last visited

Everything posted by es131245

  1. Got this on working site. <form action="url" onSubmit="if (check){return true} else {in();return false;}" /> I want to add extra function before this statement. <form action="url" onSubmit="log();if (check){return true} else {in();return false;}" /> But now statement doent work. How come? I can't remove statement here.
  2. var CODE = { auth: function () {//code }} How can i "prepend" some code at CODE.auth?
  3. Easy. foreach($users as $u){print('<input type="radio" name="username" value="'.$u.'">'.$u.'<br>');} Drop down is CSS finish off.
  4. I need to add some code in front of existing js function class.authorization().
  5. Usual function are easly edited by var script=$(document).ready;$(document).ready(function(){script; alert('document ready!');}); But how to edit functions in an object? var class={one:function(){alert('1');}, two:function(){alert('2');}}
  6. 1) Thx, misprint in example. Site is fine, html valid. 2) Tried. Footer apear at the bottom border of window on load, even when text continue down.
  7. 1) Why it will not validate? 2) Thats the point, I nead to find a way to make it relavite and fiix it to the bottom.
  8. Code looks like <body> <a>nav 1</a> <a>nav 2</a> <a>nav 3</a> <h1>header</h1> <p>content</p> <p>content 2</a> <a>content 3</a> <a id="copyright">©r</a></body> How to stick #copyright to the bottom of the page, after content, with bottom:0 without changing any HTML?
  9. Thanks for replay. Few things that wasnt mentioned. 1 Scrollable should be only div box, but div box isnt only content in "#content". As we see there is a header and a form. Moreover it should be fluid because of window size. I cant fix it becasue header, nav and footer is in px's. and content is the rest. 2 Eureka! I shouldnt use textarea! I should make any other tag (ex. DIV) and colors can be added by CSS. Input can be managed with keyDown. "</textarea><script>..." problems will be solved using html unicode. Ex «<» → «<» «>» → «>»
  10. es131245

    Full screen "page"

    Two ways comes to my mind: - position fixed; bottom:0; - html,body,div#page {height:100%;width:100%;margin:0;padding:0;}
  11. Remaking file editor on PHP && JS. My page is made on a 100% height & width table with 4 rows (header, navigation, content and footer). Header, navigation and footer rows are fixed sized, but content isnt. Content looks like: h1,input path, Ok button and table till end of the page (till footer). Table contains 2 horizontal sections. 1 is a file browser (ul with li's controlled buy JS) and a textarea (file content). Here are the questions: 1) How can I make a scrollable DIV till footer? position:relative; bottom:0; dont work. 2) Is DIVonly tag that can be scrolled? (body, doent count) 3) Is there any way to make text editor colorfull? Like code boxes on site but editable? Here are the source PHP: <?php if(!isset($CFG['user']['privileges'])||!is_array($CFG['user']['privileges'])||!in_array('editor',$CFG['user']['privileges'])) {require('error'); return;} if(isset($_GET['path'])&&$_GET['path']!='') {$_GET['path']=$CFG['editorPath'].$_GET['path']; if($_GET['path']!=preg_replace('/(/../|/~/)/','/',$_GET['path'])) {print($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?path='.preg_replace('/(/../|/~/)/','/',$_GET['path'])); exit();} if(!is_readable($_GET['path'])){exit('Файл недоступен');} else{exit(file_get_contents($_GET['path']));}} if(isset($_POST['path'])&&$_POST['path']!=''&&$_POST['path']==preg_replace('/(/../|/~/)/','/',$_POST['path'])&&is_readable('/media/www'.$_POST['path'])&&isset($_POST['content'])) {if(!is_writable('/media/html'.$_POST['path'])){exit('Нет прав на запись этого файла');} $fp=fopen('/media/html'.$_POST['path'],'w'); fwrite($fp,str_replace('n','n',$_POST['content'])); fclose($fp); header('HTTP/1.0 204 No Content'); header('Content-Length: 0',true); exit('Успешно');} $CFG['content']['style']=' td#content table{width:100%;}'."n"; $CFG['content']['style'].=' td#content table:first-of-type tr td:last-child{color:gray;width:100px;}'."n"; $CFG['content']['style'].=' td#content table:first-of-type tr td:last-child input{color:gray;width:100%;}'."n"; $CFG['content']['style'].=' td#content table tr td input{font-weight:bold;width:99%;}'."n"; $CFG['content']['style'].=' td#content table#editor{border-collapse:collapse;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child{width:40px;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child div{height:600px;overflow-x:auto;overflow-y:auto;white-space:nowrap;width:40px;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child ul{list-style-type:none;margin:0;padding:0 20px;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child ul li:not(.permission){cursor:pointer;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child ul li.permission{color:red;cursor:default;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child ul li img{padding-right:4px;vertical-align:bottom;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:first-child li span.filename{display:none;}'."n"; $CFG['content']['style'].=' td#content table#editor tr td:last-child textarea{background-color:#c9c9c9;border-top-left-radius:5px;box-shadow:0 0 9px gray;font-family:YesSerif;font-size:15px;font-style:italic;font-weight:bold;height:600px;overflow:scroll;text-align:left;text-shadow:0 0 1px white;vertical-align:top;width:100%;}'."n"; $CFG['content']['body']=' <h2>Редактор</h2>'."n"; $CFG['content']['body'].=' <table class="exclusion">'."n"; $CFG['content']['body'].=' <tr>'."n"; $CFG['content']['body'].=' <td>'."n"; $CFG['content']['body'].=' <input type="text" disabled="disabled" value="path" />'."n"; $CFG['content']['body'].=' </td>'."n"; $CFG['content']['body'].=' <td>'."n"; $CFG['content']['body'].=' <input type="button" value="сохранить" />'."n"; $CFG['content']['body'].=' </td>'."n"; $CFG['content']['body'].=' </tr>'."n"; $CFG['content']['body'].=' </table>'."n"; $CFG['content']['body'].=' <table class="exclusion" id="editor">'."n"; $CFG['content']['body'].=' <tr>'."n"; $CFG['content']['body'].=' <td>'."n"; $CFG['content']['body'].=' <div>'."n"; function listing($path,$spaces) {for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} $GLOBALS['CFG']['content']['body'].=' <ul>'."n"; if($path=='../backUp'||$path=='../WWW.ru') {for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} $GLOBALS['CFG']['content']['body'].=' <li class="permission"><img src="/source/images/editor/denied.png" alt="permission denied" />Отказано в доступе</li>'."n"; for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} $GLOBALS['CFG']['content']['body'].=' </ul>'."n"; return;} foreach(scandir($path) as $tmp) {if($tmp=='..'||$tmp=='.'){continue;} for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} if(is_dir($path.'/'.$tmp)==true){$GLOBALS['CFG']['content']['body'].=' <li class="directory"><img src="/source/images/editor/directory.png" alt="directory" />'.$tmp.((is_dir($path.'/'.$tmp)==true)?(''):('</li>'))."n";} else {$fo=finfo_open(FILEINFO_MIME_TYPE); $mime=finfo_file($fo,'/media/html/localhost/'.$path.'/'.$tmp); finfo_close($fo); if(in_array($mime,array('text/plain','text/html','text/x-php','application/xml','inode/x-empty','text/x-shellscript'))){$GLOBALS['CFG']['content']['body'].=' <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />'.$tmp.'</li>'."n";} else{$GLOBALS['CFG']['content']['body'].=' <li class="file"><img src="/source/images/editor/file.png" alt="file" />'.$tmp.'</li>'."n";} unset($fo,$mime);} if(is_dir($path.'/'.$tmp)) {listing($path.'/'.$tmp,($spaces+2)); for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} $GLOBALS['CFG']['content']['body'].=' </li>'."n";}} for($i=0;$i<$spaces;$i++){$GLOBALS['CFG']['content']['body'].=' ';} $GLOBALS['CFG']['content']['body'].=' </ul>'."n";} $CFG['content']['body'].=listing('..',0); $CFG['content']['script']=' $(document).ready(function()'."n"; $CFG['content']['script'].=' {$('td#content ul li:not(.permission)').hover(function()'."n"; $CFG['content']['script'].=' {$(this).css({'color':'blue'});'."n"; $CFG['content']['script'].=' $(this).children().css({'color':'black'});},'."n"; $CFG['content']['script'].=' function()'."n"; $CFG['content']['script'].=' {$(this).css({'color':'black'});});'."n"; $CFG['content']['script'].=' $('td#content td ul li>ul').css({'display':'none'});'."n"; $CFG['content']['script'].=' $('td#content ul li.directory').each(function()'."n"; $CFG['content']['script'].=' {$(this).css({'list-style-image':'url(/source/images/editor/closed.gif)'});'."n"; $CFG['content']['script'].=' $(this).children().css({'list-style-image':'none'});});'."n"; $CFG['content']['script'].=' $('td#content td ul li.directory').click(function(data,handler)'."n"; $CFG['content']['script'].=' {if(data.target==this)'."n"; $CFG['content']['script'].=' {$(this).find('>ul').slideToggle(350,function()'."n"; $CFG['content']['script'].=' {if($(this).parent().children('ul').css('display')=='none'){$(this).parent().css({'list-style-image':'url(/source/images/editor/closed.gif)'});}'."n"; $CFG['content']['script'].=' else{$(this).parent().css({'list-style-image':'url(/source/images/editor/opened.gif)'});}});}});'."n"; $CFG['content']['script'].=' $('td#content table:first-of-type td:first-child input').val('path');'."n"; $CFG['content']['script'].=' $('textarea').val('');'."n"; $CFG['content']['script'].=' var text='';'."n"; $CFG['content']['script'].=' $('td#content table tr td ul li.edit').click(function()'."n"; $CFG['content']['script'].=' {$('textarea').val('');'."n"; $CFG['content']['script'].=' for(var u=$(this);u.parent().parent().length>0;u=u.parent().parent())'."n"; $CFG['content']['script'].=' {$('textarea').val('/'+u.clone().children().remove().end().text()+'n'+$('textarea').val());}'."n"; $CFG['content']['script'].=' $('td#content table:first-of-type tr td:first-child input').val($('textarea').val().replace(/(^/$|^s+|n|n|r)/gm,''));'."n"; $CFG['content']['script'].=' $('textarea').html('Загружается');'."n"; $CFG['content']['script'].=' $.ajax('."n"; $CFG['content']['script'].=' {type: 'GET','."n"; $CFG['content']['script'].=' url: '/editor?path='+$('td#content table:first-of-type tr td:first-child input').val(),'."n"; $CFG['content']['script'].=' success: function(html)'."n"; $CFG['content']['script'].=' {$('textarea').val(html);'."n"; $CFG['content']['script'].=' text=html;'."n"; $CFG['content']['script'].=' $('textarea').bind('keyup change',function()'."n"; $CFG['content']['script'].=' {if($('textarea').val()!=text){$('td#content table:first-of-type tr td:last-child input').css({'color':'red'});}'."n"; $CFG['content']['script'].=' else{$('td#content table:first-of-type tr td:last-child input').css({'color':'gray'});}});}});});'."n"; $CFG['content']['script'].=' $('td#content table:first-of-type tr td:last-child input').click(function()'."n"; $CFG['content']['script'].=' {if($('td#content table:first-of-type tr td:last-child input').css('color')=='rgb(255, 0, 0)')'."n"; $CFG['content']['script'].=' {$('textarea').attr({'readonly':'readonly'});'."n"; $CFG['content']['script'].=' $.ajax('."n"; $CFG['content']['script'].=' {type: 'POST','."n"; $CFG['content']['script'].=' data: {"path":$('td#content table:first-of-type tr td:first-child input').val(),"content":$('textarea').val()},'."n"; $CFG['content']['script'].=' url: ''.$_SERVER['SCRIPT_NAME'].'','."n"; $CFG['content']['script'].=' success: function(html)'."n"; $CFG['content']['script'].=' {if(typeof(html)!='undefined'&&html!='Успешно'){alert(html);}'."n"; $CFG['content']['script'].=' else'."n"; $CFG['content']['script'].=' {text=$('textarea').val();'."n"; $CFG['content']['script'].=' $('td#content table:first-of-type tr td:last-child input').css({'color':'gray'});'."n"; $CFG['content']['script'].=' $('textarea').removeAttr('readonly');}}});}});'."n"; $CFG['content']['script'].=' $('table#editor tr td:first-child').hover(function(){$('table#editor tr td:first-child,table#editor tr td:first-child div').stop().animate({'width':'250px'},500);},function(){$('table#editor tr td:first-child,table#editor tr td:first-child div').stop().animate({'width':'40px'},500);});});'."n"; $CFG['content']['body'].=' </div>'."n"; $CFG['content']['body'].=' </td>'."n"; $CFG['content']['body'].=' <td><textarea name="content" spellcheck="false" wrap="off"></textarea></td>'."n"; $CFG['content']['body'].=' </tr>'."n"; $CFG['content']['body'].=' </table>'."n";?> HTML result: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru-RU" lang="ru"> <head> <base href="http://" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="index, follow" /> <title>TITLE</title> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" href="/source/style.css" /> <script type="text/javascript" src="/source/script/jquery.js"></script> <script type="text/javascript" src="/source/script/script.js"></script> </head> <body> <table class="page"> <tr class="head"> <td class="head"> <table class="head"> <tr> <td class="heading"><h1></h1></td> <td class="authorization"> </td> </tr> </table> </td> </tr> <tr class="navigation"> <td class="navigation"> <table class="navigation"> <tr> <td><a href="/"><img src="/source/images/index.png" alt="index" /> Индекс</a></td> <td><a href="/service"><img src="/source/images/service.png" alt="услуги" /> Услуги</a></td> <td><a href="/contacts"><img src="/source/images/contacts.png" alt="контакты" /> Контакты</a></td> </tr> </table> </td> </tr> <tr class="body"> <td class="body"> <table class="body"> <tr> <td id="content"> <style type="text/css"> td#content table{width:100%;} td#content table:first-of-type tr td:last-child{color:gray;width:100px;} td#content table:first-of-type tr td:last-child input{color:gray;width:100%;} td#content table tr td input{font-weight:bold;width:99%;} td#content table#editor{border-collapse:collapse;} td#content table#editor tr td:first-child{width:40px;} td#content table#editor tr td:first-child div{height:600px;overflow-x:auto;overflow-y:auto;white-space:nowrap;width:40px;} td#content table#editor tr td:first-child ul{list-style-type:none;margin:0;padding:0 20px;} td#content table#editor tr td:first-child ul li:not(.permission){cursor:pointer;} td#content table#editor tr td:first-child ul li.permission{color:red;cursor:default;} td#content table#editor tr td:first-child ul li img{padding-right:4px;vertical-align:bottom;} td#content table#editor tr td:first-child li span.filename{display:none;} td#content table#editor tr td:last-child textarea{background-color:#c9c9c9;border-top-left-radius:5px;box-shadow:0 0 9px gray;font-family:YesSerif;font-size:15px;font-style:italic;font-weight:bold;height:600px;overflow:scroll;text-align:left;text-shadow:0 0 1px white;vertical-align:top;width:100%;} </style> <h2>Редактор</h2> <table class="exclusion"> <tr> <td> <input type="text" disabled="disabled" value="path" /> </td> <td> <input type="button" value="сохранить" /> </td> </tr> </table> <table class="exclusion" id="editor"> <tr> <td> <div> <ul> <li class="directory"><img src="/source/images/editor/directory.png" alt="directory" />.snap <ul> </ul> </li> <li class="directory"><img src="/source/images/editor/directory.png" alt="directory" />SITE1 <ul> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />amp.html</li> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />authorization.html</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />favicon.ico</li> <li class="directory"><img src="/source/images/editor/directory.png" alt="directory" />files <ul> <li class="file"><img src="/source/images/editor/file.png" alt="file" />0213.jpg</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />0213f.jpg</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />plata.jpg</li> </ul> </li> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />index.html</li> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />index.php</li> <li class="directory"><img src="/source/images/editor/directory.png" alt="directory" />source <ul> <li class="file"><img src="/source/images/editor/file.png" alt="file" />background.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />bar.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />close.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />cm2000.zip</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />exit.png</li> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />jquery.js</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />print.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />remove.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />rough.png</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />store.png</li> <li class="edit"><img src="/source/images/editor/edit.png" alt="edit" />style.css</li> <li class="file"><img src="/source/images/editor/file.png" alt="file" />submit.png</li> </ul> </li> </ul> </li> </ul> </div> </td> <td><textarea name="content" spellcheck="false" wrap="off"></textarea></td> </tr> </table> <script type="text/javascript"> $(document).ready(function() {$('td#content ul li:not(.permission)').hover(function() {$(this).css({'color':'blue'}); $(this).children().css({'color':'black'});}, function() {$(this).css({'color':'black'});}); $('td#content td ul li>ul').css({'display':'none'}); $('td#content ul li.directory').each(function() {$(this).css({'list-style-image':'url(/source/images/editor/closed.gif)'}); $(this).children().css({'list-style-image':'none'});}); $('td#content td ul li.directory').click(function(data,handler) {if(data.target==this) {$(this).find('>ul').slideToggle(350,function() {if($(this).parent().children('ul').css('display')=='none'){$(this).parent().css({'list-style-image':'url(/source/images/editor/closed.gif)'});} else{$(this).parent().css({'list-style-image':'url(/source/images/editor/opened.gif)'});}});}}); $('td#content table:first-of-type td:first-child input').val('path'); $('textarea').val(''); var text=''; $('td#content table tr td ul li.edit').click(function() {$('textarea').val(''); for(var u=$(this);u.parent().parent().length>0;u=u.parent().parent()) {$('textarea').val('/'+u.clone().children().remove().end().text()+'n'+$('textarea').val());} $('td#content table:first-of-type tr td:first-child input').val($('textarea').val().replace(/(^/$|^s+|n|n|r)/gm,'')); $('textarea').html('Загружается'); $.ajax( {type: 'GET', url: '/editor?path='+$('td#content table:first-of-type tr td:first-child input').val(), success: function(html) {$('textarea').val(html); text=html; $('textarea').bind('keyup change',function() {if($('textarea').val()!=text){$('td#content table:first-of-type tr td:last-child input').css({'color':'red'});} else{$('td#content table:first-of-type tr td:last-child input').css({'color':'gray'});}});}});}); $('td#content table:first-of-type tr td:last-child input').click(function() {if($('td#content table:first-of-type tr td:last-child input').css('color')=='rgb(255, 0, 0)') {$('textarea').attr({'readonly':'readonly'}); $.ajax( {type: 'POST', data: {"path":$('td#content table:first-of-type tr td:first-child input').val(),"content":$('textarea').val()}, url: '/editorP', success: function(html) {if(typeof(html)!='undefined'&&html!='Успешно'){alert(html);} else {text=$('textarea').val(); $('td#content table:first-of-type tr td:last-child input').css({'color':'gray'}); $('textarea').removeAttr('readonly');}}});}}); $('table#editor tr td:first-child').hover(function(){$('table#editor tr td:first-child,table#editor tr td:first-child div').stop().animate({'width':'250px'},500);},function(){$('table#editor tr td:first-child,table#editor tr td:first-child div').stop().animate({'width':'40px'},500);});}); </script> </td> </tr> </table> </td> </tr> <tr class="footer"><td class="footer"></td></tr> </table></body></html>
  12. Sorry for bothering. Solved it
  13. es131245

    Error in database

    offtopic but no need in empty brakets $query = "INSERT INTO users (name,email,password,added_date,status) VALUES ('$name','$email','$password','NOW()',,'0');
  14. Hi! Im using ajax + jquery + php navigation. If php gets page with $_GET['method']=='ajax' its peturn page without header and footer. Jquery gets responce and changes #content of the page to responce. So whole site works with it even without any changes in url line. But to make work <input type="button" value="DO " onclick="if(confirm('SURE?')==true){location.href=location.pathname+'?do=DoEverything';}" /> I nead to change url. Any ideas? I dont want to add new variable with our in it.
  15. Im writing an admin text editor for php files which uses ajax to load page sources(!).Of course editor page is password protected but i need to encode whem any way. (because my heart aches when php pages are passed thought wires without any encoding. Password is needed for decoding) So is there any way i can password encode page and decode it with password using javascript? thx
  16. replace doent help because i use $(this).attr('id') Prepend helped $('ul#index li').each(function(){if(typeof($(this).attr('id'))!='undefined') {$(this).prepend('<span class="number">'+$(this).attr('id').substr(4)+'</span>');} SOLVED thank you
  17. background-repeat: repeat-x, repeat-x, repeat-x;???
  18. sorry error while typing topic. Topic isnt solved yet. <html><head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script></head><body><ul><li>1 <ul> <li>11</li> <li>12</li> <li>13</li> </ul></li><li>2 <ul> <li>21 <ul> <li>212</li> </ul> </li> <li>22</li> </ul></li><li>3</li></ul><script type="text/javascript">$(document).ready(function(){$('ul li').each(function(){$(this).html('_'+$(this).html());});});</script></body></html>
  19. <ul><li>1 <ul> <li>11</li> <li>12</li> <li>13</li> </ul></li><li>2 <ul> <li>21 <ul> <li>212</li> </ul> </li> <li>22</li> </ul></li><li>3</li></ul> $(ul li).each(function(){$(this).html('_'+$(this).html());}); works only for first levelmoreover $(ul li,ul li ul li,ul li ul li ul li).each({$(this).html('_'+$(this).html());}); isnt working ether What is wrong?Why selectors work diferent way than css? PS $(ul li).each(function(){$(this).css({'background':'url("favicon.ico") top left no-repeat'});}); Works ( blame html\(\)?)
  20. its something with the other sites scripts.Google, yandex.ru,vk.com, didnt workfew other worked andmail.com used direct.
  21. try1 html,body {height:100%;width:100%;}2 html,body,#topdiv,#services {margin:0;padding:0;}
  22. same but consequently <td class="extra"> <img src="/source/images/tools.png" alt="tools" /> <ul id="extra"> <li><a href="/projects">Проекты</a></li> <li><a href="/hash">Хеш</a></li> <li><a href="/digits">Числа</a></li> </ul> </td> td.extra{background-color:#2a2;box-shadow:0 0 2px white,inset 0 0 5px white;width:28px;}td.extra ul#extra{background-color:#2a2;border-radius:0 0 5px 5px;box-shadow:-2px -5px 5px white inset,2px -5px 5px white inset;list-style-type:none;margin:0;padding:0;position:absolute;right:2px;text-align:center;width:135px;}td.extra:hover ul#extra{display:block;}td.extra ul#extra li:last-child{padding-bottom:12px;}td.extra ul#extra li a{color:#00f;text-shadow:0 0 5px white,0 0 1px blue;}td.extra ul#extra li:hover a{color:white;text-shadow:0 0 5px blue;} function extraSlide(n,afterf){n++;$('#extra li').eq(n).slideToggle(200);if($('#extra li').size()>=n){setTimeout(function(){extraSlide(n,afterf);},100);}else{if(typeof(afterf)!=='undefined'){return afterf();}}}$(document).ready(function(){$('#extra li').slideToggle(-1);$('td.extra').hover(function(){$('td.extra').animate({width:'135px'},function(){extraSlide(-1);});},function(){extraSlide(-1,function() {$('td.extra').animate({width:'28px'});});});});
×
×
  • Create New...