Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5969415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:13:37+00:00 2026-05-22T20:13:37+00:00

I am using the jquery based eyeCon color picker(http://www.eyecon.ro/colorpicker/). When I click and drag

  • 0

I am using the jquery based eyeCon color picker(http://www.eyecon.ro/colorpicker/).

When I click and drag the mouse over the colored area, the color is changing. But when I just click on the colored area, then the color is not getting updated.

I digged its source and found two functions named downSelector() and moveSelector() getting invoked on mousedown and mousemove respectively. I just added a call to moveSelector() on the downSelector() function passing its own ev object. But it doesnt work and throws the following error:
Uncaught TypeError: Cannot read property ‘cal’ of undefined

It might be because the ev object for mousedown and mousemove are different.

But I need to update the color on mousedown event. Any suggestions?

thanks in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:13:38+00:00Added an answer on May 22, 2026 at 8:13 pm

    In colorpicker.js, you can call moveSelector from upSelector like this:

    moveSelector = function (ev) {
      change.apply(
      ev.data.cal.data('colorpicker').fields.eq(6)
        .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
        .end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
        .get(0),[ev.data.preview]
      );
      return false;
    },
    
    upSelector = function (ev) {
    
      moveSelector(ev);
    
      fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
      fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
      $(document).unbind('mouseup', upSelector);
      $(document).unbind('mousemove', moveSelector);
      return false;
    }, 
    

    This little hack works well 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using jquery and tabs based on http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/ <script type=text/javascript> $(function() { $(.tab_content).hide(); //Hide
I have a schedule grid based on a HTML table using jQuery/jQuery UI drag
I adapted the jQuery slider code from http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/ into my website which is based
I'm using Jquery Autocomplete based on: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ . I am able to select a
I created a page that has a JQuery based dialog using the standard JQuery
I am using jquery to duplicate several html fields based on user's selection. However,
I am working with a touch based slideshow for the iPad using Jquery tools
Hai i am generating page numbers based on currentpage and lastpage using jquery ...
Below is my form. Using jQuery I load a <select> element based on value
I am using the jQuery UI library out of the box, based on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.