• Как установить курсор внутри textarea с помощью jquery?

    iwqn
    @iwqn Автор вопроса
    DevMan: странно но я сейчас попробовал запихнуть тот текст который у меня в textarea прямо в ваш пример - на том вашем сайте

    и ситуация повтрилась - с первого нажатия поиск не сработал

    текст по которому я ищу вот такой

    .statia img{
    width: 675px;
    }

    html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
    background: url(../img/1.jpg);
    }

    ::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
    }

    ::selection {
    background: #b3d4fc;
    text-shadow: none;
    }

    hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
    }

    audio,
    canvas,
    iframe,
    img,
    svg,
    video {
    vertical-align: middle;
    }

    fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    }

    textarea {
    resize: vertical;
    }

    .browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
    }

    /* ==========================================================================
    Author's custom styles
    ========================================================================== */
    .zag {
    font-size: 1.1em;
    font-weight: bold;
    }

    .zag2 {
    font-size: 1.2em;
    font-weight: bold;
    }

    body {

    }
    a {
    color: black;
    }
    .header {
    width: 1000px;
    margin: 0 auto;
    height: 100px;
    padding: 10px;
    -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; background-size: 100% 100%;
    background: -moz-linear-gradient(top,deepskyblue,#efefef);
    background: -webkit-gradient(linear, left top, left bottom, from(deepskyblue), to(#efefef));
    filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=deepskyblue,endColorstr=#efefef,GradientType=0); zoom: 1;
    background: linear-gradient(top,deepskyblue,#efefef);
    background-clip: border-box; -moz-background-clip: border; -webkit-background-clip: border-box;
    background-origin: border-box; -moz-background-origin: border; -webkit-background-origin: border-box;
    }
    .logo {
    position: relative;
    top: 5px;
    left: 35px;
    height:120px;
    display: inline;
    }
    .header h1 {
    position: relative;
    top: 3px;
    left: 150px;
    display: inline;
    font-family: 'Monotype corsiva';
    color: black;
    text-shadow: 1px 1px 1px green;
    font-size: 2.5em;
    }
    .content {
    width: 1000px;
    min-height: 900px;
    margin: 0 auto;
    padding: 10px;
    background-color: #efefef;
    }
    .menu {
    margin-left: -20px;
    margin-top: 30px;
    width: 260px;
    padding: 10px;
    padding-right: 20px;
    display: inline-block;
    }
    .foto {
    width: 200px;
    margin-left:40px;
    border:3px solid violet;
    }
    .menu ul {
    list-style: none;
    }
    .clr {
    text-indent: 0px;
    }
    .clr span:nth-child(1) {color: #133BC1;}
    .clr span:nth-child(2) {color: #E33B21;}
    .clr span:nth-child(3) {color: #E6B500;}
    .clr span:nth-child(4) {color: #4BCE54;}
    .clr span:nth-child(5) {color: #0048E3;}
    .clr span:nth-child(6) {color: #E33B21;}
    .clr span:nth-child(7) {color: #133BC1;}
    .clr span:nth-child(8) {color: #E33B21;}
    .clr span:nth-child(9) {color: #E6B500;}
    .clr span:nth-child(10) {color: #4BCE54;}
    .clr span:nth-child(11) {color: #0048E3;}
    .clr span:nth-child(12) {color: #E33B21;}
    .clr span:nth-child(13) {color: #133BC1;}
    .clr span:nth-child(14) {color: #E33B21;}
    .clr span:nth-child(15) {color: #E6B500;}
    .clr span:nth-child(16) {color: #4BCE54;}
    .clr span:nth-child(17) {color: #0048E3;}
    .clr span:nth-child(18) {color: #E33B21;}
    .clr span:nth-child(19) {color: #133BC1;}
    .clr span:nth-child(20) {color: #E33B21;}
    .clr span:nth-child(21) {color: #E6B500;}
    .clr span:nth-child(22) {color: #4BCE54;}
    .clr span:nth-child(23) {color: #0048E3;}
    .clr span:nth-child(24) {color: #E33B21;}
    .clr span:nth-child(25) {color: #0048E3;}
    .clr span:nth-child(26) {color: #E33B21;}
    .clr span:nth-child(27) {color: #E6B500;}
    .clr span:nth-child(28) {color: #4BCE54;}
    .menu ul li a {
    display: block;
    width: 185px;
    padding-left: 10px;
    padding-right: 10px;
    height: 35px;
    line-height: 35px;
    -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; background-size: 100% 100%;
    background: -moz-linear-gradient(top,#fff,violet);
    background: -webkit-gradient(linear, left top, left bottom, from(white), to(violet));
    filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=#ffffff,endColorstr=violet,GradientType=0); zoom: 1;
    background: linear-gradient(top,#fff,violet);
    background-clip: border-box; -moz-background-clip: border; -webkit-background-clip: border-box;
    background-origin: border-box; -moz-background-origin: border; -webkit-background-origin: border-box;
    text-align: left;
    color: black;
    margin-bottom: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    font-family: "Arial";
    }
    .menu ul li a:hover {
    -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; background-size: 100% 100%;
    background: -moz-linear-gradient(top,#fff,#89f81f);
    background: -webkit-gradient(linear, left top, left bottom, from(white), to(#89f81f));
    filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=#ffffff,endColorstr=#89f81f,GradientType=0); zoom: 1;
    background: linear-gradient(top,#fff,#89f81f);
    background-clip: border-box; -moz-background-clip: border; -webkit-background-clip: border-box;
    background-origin: border-box; -moz-background-origin: border; -webkit-background-origin: border-box;
    }
    .main {
    width: 680px;
    padding: 10px;
    display: inline-block;
    vertical-align: top;
    text-align: justify;
    font-family: 'Sans';
    white-space: pre-wrap;
    white-space: pre;
    white-space: pre-line;
    white-space: -moz-pre-wrap !important;
    white-space: -hp-pre-wrap;
    white-space: -o-pre-wrap;
    white-space: -pre-wrap;
    word-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    }
    a {
    color: darkgreen;
    text-decoration: none;
    }
    .footer {
    width: 1000px;
    height: 50px;
    line-height: 50px;
    margin: 0 auto;
    padding: 10px;
    -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -khtml-background-size: 100% 100%; background-size: 100% 100%;
    background: -moz-linear-gradient(top,#efefef,lightgreen);
    background: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(lightgreen));
    filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=#efefef,endColorstr=lightgreen,GradientType=0); zoom: 1;
    background: linear-gradient(top,#efefef,lightgreen);
    background-clip: border-box; -moz-background-clip: border; -webkit-background-clip: border-box;
    background-origin: border-box; -moz-background-origin: border; -webkit-background-origin: border-box;
    text-align: center;
    color: black;
    font-weight: bold;
    font-size: 0.9em;
    font-family: "Arial";
    }
    .anons {
    display: block;
    margin-top: 20px;
    }
    input, textarea {
    width: 600px;
    }

    /* ==========================================================================
    Media Queries
    ========================================================================== */

    media only screen and (max-width: 800px) {
    .header {
    width: 90%;
    height: 50px;
    }
    .logo {
    display: none;
    }
    .foto {
    width: 90%;
    border:3px solid violet;
    }
    .header h1 {
    top: 5px;
    left: 10px;
    text-shadow: none;
    font-size: 1.7em;
    }
    img {
    max-width: 100%;
    }
    .content {
    width: 90%;
    }
    .menu {
    padding: 5px;
    padding-right: 0px;
    width: 90%;
    text-align: center;
    }
    .menu ul li a {
    width: 100%;
    }
    .main {
    width: 90%;
    }
    .footer {
    width: 90%;
    height: 50px;
    line-height: 50px;
    }
    input, textarea {
    width: 80%;
    }
    }

    media print,
    (-o-min-device-pixel-ratio: 5/4),
    (-webkit-min-device-pixel-ratio: 1.25),
    (min-resolution: 120dpi) {

    }

    /* ==========================================================================
    Helper classes
    ========================================================================== */

    .hidden {
    display: none !important;
    visibility: hidden;
    }

    .visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    }

    .visuallyhidden.focusable:active,
    .visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    }

    .invisible {
    visibility: hidden;
    }

    .clearfix:before,
    .clearfix:after {
    content: " ";
    display: table;
    }

    .clearfix:after {
    clear: both;
    }

    .clearfix {
    *zoom: 1;
    }

    /* ==========================================================================
    Print styles
    ========================================================================== */

    media print {
    *,
    *:before,
    *:after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    }

    a,
    a:visited {
    text-decoration: underline;
    }

    a[href]:after {
    content: " (" attr(href) ")";
    }

    abbr[title]:after {
    content: " (" attr(title) ")";
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
    content: "";
    }

    pre,
    blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
    }

    thead {
    display: table-header-group;
    }

    tr,
    img {
    page-break-inside: avoid;
    }

    img {
    max-width: 100% !important;
    }

    p,
    h2,
    h3 {
    orphans: 3;
    widows: 3;
    }

    h2,
    h3 {
    page-break-after: avoid;
    }
    }

    при этом я пытаюсь искать например слово anons
  • Как установить курсор внутри textarea с помощью jquery?

    iwqn
    @iwqn Автор вопроса
    DevMan: код там довольно таки длинный поэтому копировать сюда не буду. Попробую найти причину сам. Само событие нажатия на кнопку срабатывает и при одиночном нажатии проверял алертом а вот установка курсора только после двух нажатий кнопки. спасибо за помощь я знаю что ваш код полностью рабочий это где то у меня глюк. возможно текст в поле ввода слишком длинный или траблы с фокусом на поле
  • Как установить курсор внутри textarea с помощью jquery?

    iwqn
    @iwqn Автор вопроса
    Спасибо на вашем примере все здорово работает но почему то когда я перенес код в свою страницу то поиск срабатывает только после двойного нажатия кнопки
  • Как выцепить из текста переменные и загнать их в массив?

    iwqn
    @iwqn Автор вопроса
    спасибо сейчас попробую! Красивое и лаконичное решение у вас.
  • Как сделать чтобы заработал php на Linux?

    iwqn
    @iwqn Автор вопроса
    А к чему это вы сказали - у меня итак в примере <?php
  • Какой шрифт здесь использован?

    iwqn
    @iwqn Автор вопроса
    Алексей С.: Что значит по английски напиши... Как я напишу то если у меня нет этого шрифта. Есть только картинка. То что вы нашли это не тот шрифт. Спасибо за попытку - но это не то... Я рассчитывал что может кто из опытных дизайнеров просто узнает шрифт (буква Д заглавная необычно выглядит)
  • Какой шрифт здесь использован?

    iwqn
    @iwqn Автор вопроса
    Сергей: No characters found!
    Please try to Auto Equalize the image and make sure it is saved in jpg format!
    Please use the image editor and select only the part with the font. Only 4-10 chars from the font.
  • Почему гугл индексирует карту сайта вместо статей?

    iwqn
    @iwqn Автор вопроса
    Михаил Лялин: грамота ру - попробуйте в ее поиск ввести слово с ошибкой например ашипка. она ничего не находит. а наш сайт находит и исправляет
  • Почему гугл индексирует карту сайта вместо статей?

    iwqn
    @iwqn Автор вопроса
    да и школьникам студентам пригодится
  • Почему гугл индексирует карту сайта вместо статей?

    iwqn
    @iwqn Автор вопроса
    Насчет noindex - сейчас в поиске есть ссылка хотя бы на all.php а если я уберу ее - где гарантии что сами статьи туда попадут...
  • Почему гугл индексирует карту сайта вместо статей?

    iwqn
    @iwqn Автор вопроса
    Нет ну почему же убирать сразу то... А вот если люди хотят посмотреть список слов по алфавиту...
  • Что быстрее использовать для получения данных в массив - файлы или БД?

    iwqn
    @iwqn Автор вопроса
    впрочем я уже решил проблему но ее решение не связано с ответом на этот вопрос. спасибо всем кто помогал
  • Что быстрее использовать для получения данных в массив - файлы или БД?

    iwqn
    @iwqn Автор вопроса
    Равшан Абдулаев: Равшан Абдулаев: есть... массивы нужно перебирать постоянно искать в них соответствия
  • Что быстрее использовать для получения данных в массив - файлы или БД?

    iwqn
    @iwqn Автор вопроса
    Эти 6 файлов в совокупности весят около 2 мб, и иногда php скрипт на пару секунд подвисает когда заносит их в массивы из файлов. Один раз даже вылетел с нехваткой ОЗУ. ((
  • Как установить высоту div такой же как высота его background-image?

    iwqn
    @iwqn Автор вопроса
    SelenIT2: не совсем - у меня некоторые элементы должны быть над картинкой. Проблему решил но совсем не так как хотелось бы.
  • Как установить высоту div такой же как высота его background-image?

    iwqn
    @iwqn Автор вопроса
    Александр Зубарев: но картинка должна быть задним фоном. z-index и float не помогают убрать ее так чтобы она не мешала остальному контенту размещенному в этом же диве
  • Как в PHP искать похожие слова?

    iwqn
    @iwqn Автор вопроса
    кажется это то что нужно. спасибо!