За последние 24 часа нас посетили 62350 программистов и 1677 роботов. Сейчас ищут 1142 программиста ...

Ошибка missing ; before statement

Тема в разделе "JavaScript и AJAX", создана пользователем Mishcka, 29 июн 2010.

  1. Mishcka

    Mishcka Активный пользователь

    С нами с:
    1 июл 2009
    Сообщения:
    41
    Симпатии:
    0
    Доброе утро.
    У меня ужасная непонятная ошибка:
    missing ; before statement
    $.fn.qtip.styles.mytooltip {\n
    - mytooltips.js (строка 1)

    Вот код:
    [js]$.fn.qtip.styles.mytooltip {
    tip: 'leftMiddle',
    border: {
    width: 10,
    radius: 6,
    color: '#FA6900'
    } ,
    background: '#F38630',
    color: '#333'
    }



    // Create the tooltips only on document load
    $(document).ready(function()
    {


    // Create the tooltips only on document load

    // Use the each() method to gain access to each elements attributes
    $('a.link').each(function()
    {
    $(this).qtip(
    {
    content: {
    // Set the text to an image HTML string with the correct src URL to the loading image you want to use
    text: '',
    url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
    title: {
    text: 'Подробно - ' + $(this).text(), // Give the tooltip a title using each elements text
    button: 'Закрыть' // Show a close link in the title
    }
    },
    position: {
    corner: {
    target: 'bottomMiddle', // Position the tooltip above the link
    tooltip: 'topMiddle'
    },
    adjust: {
    screen: true // Keep the tooltip on-screen at all times
    }
    },
    show: {
    when: 'click',
    solo: true // Only show one tooltip at a time
    },
    hide: 'unfocus',
    style: {
    tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
    border: {
    width: 0,
    radius: 4
    },
    name: 'light', // Use the default light style
    width: 570 // Set the tooltip width
    }
    })
    });
    });[/js]

    Заранее большое спасибо.
     
  2. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    может
    [js]
    $.fn.qtip.styles.mytooltip ({
    tip: 'leftMiddle',
    border: {
    width: 10,
    radius: 6,
    color: '#FA6900'
    } ,
    background: '#F38630',
    color: '#333'
    });[/js]
     
  3. Apple

    Apple Активный пользователь

    С нами с:
    13 янв 2007
    Сообщения:
    4.984
    Симпатии:
    2
    Это мне кажется, или действительно намутили тут MooTools в перемешку с jQuery?
     
  4. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    хз. но у меня на первый скрипт тоже ругается точно так же.
     
  5. Mishcka

    Mishcka Активный пользователь

    С нами с:
    1 июл 2009
    Сообщения:
    41
    Симпатии:
    0
    Где вы увидели MooTools?


    Проблема решилась.
    $.fn.qtip.styles.mytooltip = {xxx:xxx, ....} Равно просто надо было добавить. Всем спасибо![/quote]
     
  6. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    А, так это перменная была! :D

    А то все *заговор*, *тайна*...