F
F
Flower Genius2018-03-01 16:06:23
JavaScript
Flower Genius, 2018-03-01 16:06:23

How to specify the parameter of the second button with different id from one button using jQuery?

There are two buttons. I need to get the data-id parameter of another button with Ajax in another button.

You can just get the parameter in that button like this . But how to get the parameter from the other button?
var name = $(this).data('name');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-03-01
@lidacriss

like this?
https://jsfiddle.net/2fgsjm3b/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question