Search Results

Search found 2 results on 1 pages for 'gazler'.

Page 1/1 | 1 

  • Jquery li element id

    - by Gazler
    Hi, I am using a jquery contextmenu plugin for right click menus which I am trying to add to each li element of an unordered list with the ID mailbox. The code I have is: $("#mailbox > li").contextMenu('myMenu1', { bindings: { 'open': function(t) { alert('Trigger was '+t.id+'\nAction was Open'); } //CODE SNIPPED }); My assumption is that this should alert the id of the list element that the contextMenu was called from, however it is returning an empty string. Am I accessing/assigning these correctly? t is an object HTMLLIElement in the context above by the way. Cheers, Gazler.

    Read the article

  • Jquery Form ajaxSubmit not submitting

    - by Gazler
    Hi, I am using the JQuery Form extension to submit a form with AJAX. I have the following code: var options = { beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback // other available options: //url: url // override for form's 'action' attribute //type: 'post', // 'get' or 'post', override for form's 'method' attribute //dataType: null // 'xml', 'script', or 'json' (expected server response type) clearForm: true, // clear all form fields after successful submit //resetForm: true // reset the form after successful submit // $.ajax options can be used here too, for example: timeout: 3000 }; $('#composeForm').submit(function() { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit $(this).find(':disabled').removeAttr('disabled'); $(this).ajaxSubmit(options); // !!! Important !!! // always return false to prevent standard browser submit and page navigation return false; }); The problem is that the form doesn't appear to be submitting, or atleast the success function is not being called. If I remove the return false, then the submission works, but the page navigates away. Is there a problem in my code that could be causing this? Cheers, Gazler.

    Read the article

1