Keresés

Új hozzászólás Aktív témák

  • Soak

    veterán

    válasz Sk8erPeter #1039 üzenetére

    Nem korábban van, nem tudom, hogy miért dobott hibát, csak azt a részt másoltam be amit te írtál,oda ahova irtad, a komment alá, nem tudom miért szarozik, mindjárt megprobálom újra, mondjuk ha belegondolok a facebookos like beágyazós js-re is szintaktikai hibát dob, holott fut rendesen, most felraktam a CS6-ot, megnézem ezzel is.

    Szerk : CS6-nak se tetszik.

    Szerk2:

    $(document).ready(function()
    {
    /*
    * Common dialogue() function that creates our dialogue qTip.
    * We'll use this method to create both our prompt and confirm dialogues
    * as they share very similar styles, but with varying content and titles.
    */
    function dialogue(content, title) {
    /*
    * Since the dialogue isn't really a tooltip as such, we'll use a dummy
    * out-of-DOM element as our target instead of an actual element like document.body
    */
    $('<div />').qtip(
    {
    content: {
    text: content,
    title: title
    },
    position: {
    my: 'center', at: 'center', // Center it...
    target: $(window) // ... in the window
    },
    show: {
    ready: true, // Show it straight away
    modal: {
    on: true, // Make it modal (darken the rest of the page)...
    blur: false // ... but don't close the tooltip when clicked
    }
    },
    hide: false, // We'll hide it maunally so disable hide events
    style: 'ui-tooltip-light ui-tooltip-rounded ui-tooltip-dialogue', // Add a few styles
    events: {
    // Hide the tooltip when any buttons in the dialogue are clicked
    render: function(event, api) {
    $('button', api.elements.content).click(api.hide);
    },
    // Destroy the tooltip once it's hidden as we no longer need it!
    hide: function(event, api) { api.destroy(); }
    }
    });
    }



    // Our Confirm method
    function Confirm(question, callback)
    {
    // Content will consist of the question and ok/cancel buttons
    var message = $('<p />', { text: question }),
    ok = $('<button />', {
    text: 'Ok',
    click: function() { callback(true); }
    }),
    cancel = $('<button />', {
    text: 'Cancel',
    click: function() { callback(false); }
    });

    dialogue( message.add(ok).add(cancel), 'Photofreak' );
    }

    // Setup the buttons to call our new Alert/Prompt/Confirm methods
    $('.event_delete input[name="delete_event"]').click(function() {
    Confirm('Are you sure you want to delete this photograph?', function(yes) {
    // do something with yes
    $.ajax({
    url: 'ajax/settings_form.php',
    data: 'asd',
    success: function(data) {
    // .............
    }
    });
    });

    return false;
    });

    Így néz ki a kód jelenleg, erre dobja a hibát.

    [ Szerkesztve ]

Új hozzászólás Aktív témák