google-code-export / jpicker

Automatically exported from code.google.com/p/jpicker
1 stars 0 forks source link

how to determine what index in $.jPicker.List is the 'current' one? #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have jPicker instantiated for multiple text inputs. 

I want to fire a change event for the text input when I click the ok button in 
the color picker.

If I knew the index for the current element I could do 
$($.jPicker.List[i]).change();

But how can I get a reference to the specific text input element or the 
corresponding index to jPicker.List for the element?

The jPicker object accepts a callback function for the click ok button event , 
but here I only get access to context which points to the ok button inside the 
color picker table, that is a direct child of the dom body, so I can't even use 
jQuery to 'find' the text element relative to the inline color picker button..

Original issue reported on code.google.com by mik...@jooze.net on 28 Jul 2011 at 10:15

GoogleCodeExporter commented 9 years ago
I have the same problem, I need to know index in jPicker.List of the current 
jPicker color .

Original comment by trytolea...@gmail.com on 13 Dec 2011 at 2:01

GoogleCodeExporter commented 9 years ago
I didn't find the answer, just moved to another solution, but I can't remember 
anymore, it's a while ago, so many projects since..

Original comment by mik...@wpkitchen.com on 13 Dec 2011 at 2:07

GoogleCodeExporter commented 9 years ago
yes I found another solution too :). Thanks a lot 

Original comment by trytolea...@gmail.com on 13 Dec 2011 at 2:49