fallen90 / ppdrag

jquery drag
GNU Lesser General Public License v3.0
0 stars 0 forks source link

stop parameter works improperly #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. (in firefox 2) use the ppdrag in a page like this $('.box').ppdrag({
stop:imhere() });
2. create a function imhere() that just shows an alert
3. refreshing the page results in runing the alert, but no further events
can run it (does not react for stopping the drag)

What is the expected output? What do you see instead?
function is running only once, it should run only and everytime when i stop
dragging an element.

What version of the product are you using? On what operating system?
first release

Please provide any additional information below.
i use it together with jquery based lightbox inside the dragged div

Original issue reported on code.google.com by naug...@gmail.com on 6 Apr 2008 at 12:06

GoogleCodeExporter commented 9 years ago
This code is incorrect:

$('.box').ppdrag({ stop:imhere() });

You are passing as the 'stop' parameter the _value_ returned by a single 
invocation
to the imhere() function. You should pass just the name of the function 
instead, like
this:

$('.box').ppdrag({ stop:imhere });

Original comment by onestone on 6 Apr 2008 at 12:36