Results 1 to 2 of 2

Thread: Help adding a "changed" callback function to existing plugin (not written by me)

  1. #1

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Help adding a "changed" callback function to existing plugin (not written by me)

    Hi,
    My jQuery skills are not that wonderful, and wanted to ask if someone can help me modify this plugin.
    Basically I need to be able to specify a callback event that need to be fired after line 56.
    Code:
    preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />');
    The reason is that while this plugin works fantastic, the moment a new image are loaded in the the "preview" div, I need to apply a jCrop call to it (which is the next step)

    Pretty please...been swearing the better part of the afternoon here.

    For what it matter, here's a demo calling the plugin : http://jasny.github.com/bootstrap/ja...tml#fileupload


  2. #2
    Hyperactive Member xxarmoxx's Avatar
    Join Date
    Mar 2007
    Posts
    378

    Re: Help adding a "changed" callback function to existing plugin (not written by me)

    Trigger Event:
    $('body').trigger("SOME_EVENT");

    Listener:
    $('body').bind("SOME_EVENT", function(){
    alert('triggered');
    });

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width