A
A
Anton Pozdnyakov2015-11-02 14:07:05
JavaScript
Anton Pozdnyakov, 2015-11-02 14:07:05

How to work with variables in jquery?

For the first time I saw jquery, somehow I didn’t understand how to pass the value of a variable from the

jsfiddle.net/zvo4c4e6/1

loop Whatever I choose in the radiobutton, the value of a and b, respectively, and strr remains the same.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-11-02
@Viccc

Whatever I choose in the radiobutton, the value of a and b, respectively, and strr remains the same.
  1. You initialize variables a and b , and write to $a and $b .
    did not understand how to pass the value of the variable from the loop
    There is no loop in your code.
    Variables in jQuery are no different than variables in the rest of javascript.
    Should be like this - jsfiddle.net/koceg/zvo4c4e6/2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question