?
Solved

get image button value onclick

Posted on 2014-07-29
4
Medium Priority
?
240 Views
Last Modified: 2014-07-29
0
Comment
Question by:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 668 total points
ID: 40227277
Get what value - there is no value
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 668 total points
ID: 40227282
$( "[id^=Delete]" ).click(function( event ) {
	event.preventDefault();
	 var ctID = $(this).attr("id");
    alert("you clicked " + ctID);
});

Open in new window

0
 
LVL 21

Assisted Solution

by:Randy Poole
Randy Poole earned 664 total points
ID: 40227291
Here is the code:
$( "[id^=Delete]" ).click(function( event ) {
	alert("you clicked " + this.id);
	event.preventDefault();
});

Open in new window


Also make sure to the left on jsfiddle, frameworks and extensions to choose JQuery 2.x or whichever you are using..
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 40227380
both were great thanks guys
0

Featured Post

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question