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

  • Home
  • SEARCH
  • 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 8329899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:56:50+00:00 2026-06-09T01:56:50+00:00

So I have been using raphael to create a user interface and want it

  • 0

So I have been using raphael to create a user interface and want it so that way if someone clicks on a circle it highlights the circle or does some sort of visually interesting thing to the circle to note that it is selected. I’m not terribly worried about the visual side of this yet. I am trying to figure out a way to make this happen and nothing seems to be working. This is rather simple. At least I thought so but it turns out this has been giving me a nice headache. I would provide code but what I have is a mess right now. If you want it I will add it though.

function elemClick(el)
            {
                el.click(function(){
                    circleSelectedArray[0] = true;

                });

                el.unclick(function(){
                    circleSelectedArray[0] = false;
                });


            }
  • 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-06-09T01:56:53+00:00Added an answer on June 9, 2026 at 1:56 am

    You cant bind click and unbind it at the same time ….

    el.click(fn) means that you are binding a click event to that element like the way you have which is fine ....
    el.unclick(fn) means that you are unbinding a click function from that element.
    

    USE -> if you go like this el.unclick() all click events will be unbound from that element
    if you want to use one function ….

     function yourFunc(){
        console.log('you clicked me !')}
        el.click(yourFunc); // now when you click this el console will show the phrase
        //when you unbind the function
        el.unclick(yourFunc);
    

    I just have a hunch that you were perhaps trying to use mousedown and mouseup events ….

    EDIT : to your requirements

    function sel_unsel(){
    if(this.data('selected') == false){
       this.data('selected', true);
       // do here what you want when element is selected
       }else if(this.data('selected') == true){
       this.data('selected', false);
       //do here what you want when element is unselected
       }
       }
    function elemClick(el){
         el.data('selected',false);
    el.click(sel_unsel);}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using raphael.draggable with a project that I am currently building. I
I am building a user interface using Raphael JS. currently I have a .js
I have been using some Javascript to create a text field once an certain
I have been using CI just fine using the MySQL driver. I want to
I have been using TabActivity and I want the tab to display on every
I have been using Javascript but more in a procedural way not the object
I have been using ASIHTTPRequest to fetch the data and i want to cancel
I have been working with Raphael to create drag and drop shapes on a
I have been using some code to create MTOM by using code from MSDN
I have been using User::pwent to get the full name of the system user

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.