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 8898199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:33:08+00:00 2026-06-15T00:33:08+00:00

I am doing a loop function to make the circles, i decided to link

  • 0

I am doing a loop function to make the circles, i decided to link the circles to drawing lines between the objects, so, the first circle is draw i should get the ‘cx’ and ‘cy’ of the object and i will start to draw the line.

for that, in case of jquery we can get the final element as using ‘:last’ selector, i am trying with raphael, any one help me to get the last element of each drawing.

my function:

var paper = new Raphael('paper',500,500);
var circle1 = paper.circle(50,50,50).attr({fill:'green'});

var circle2 = paper.circle(200,50,50).attr({fill:'red'});

$(paper.node,':first').click(function(){
    alert(this.atrr('x'));
})


$(paper.node,':last').click(function(){
    alert(this.atrr('x'));
})

jsfiddle here

  • 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-15T00:33:10+00:00Added an answer on June 15, 2026 at 12:33 am

    Your functions are not correctly setted, you should use it like this:

    http://jsfiddle.net/S6REC/

    $('circle:first',paper.node).click(function(){
        alert($(this).attr('cx'));
    })
    
    
    $('circle:last',paper.node).click(function(){ 
        alert($(this).attr('cx'));
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a loop of 3 times and 2 seconds in between
In below sample code, I use lambda function to make 3 threads doing different
I'm trying to make a function in VB.net that will loop through an algorithm.
hi im doing a loop so i could get dict of data, but since
So what I am doing is, I have a loop and I call a
So here's what I see this code doing: An array is made A loop
Doing my first SL4 MVVM RIA based application and i ran into the following
Doing my first tryouts with foreign keys in a mySQL database and are trying
I am trying to make a removeAll() function, which will remove all elements of
Instead of doing an each loop on a JSON file containing a list of

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.