Skip to content

Added an event - background_drag#3

Open
jesinwp wants to merge 2 commits intokentor:masterfrom
jesinwp:master
Open

Added an event - background_drag#3
jesinwp wants to merge 2 commits intokentor:masterfrom
jesinwp:master

Conversation

@jesinwp
Copy link
Copy Markdown

@jesinwp jesinwp commented Feb 27, 2014

This event triggers when dragging the background image and contains the X and Y background-position values of the background-image.

Usage:

$('#draggable_bg').background_drag(function(e){
    $('p#bg_coordinates').text(e.posX + 'px x ' + e.posY + 'px' );
});
$('#draggable_bg').on('background_drag', function(e){
    $('p#bg_coordinates').text(e.posX + 'px x ' + e.posY + 'px' );
});

JSFiddle demo: http://fiddle.jshell.net/jesin/AL8hX/show/light/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant