return from each
return from each
Hello please help to solve the problem.
I have this type of constructions. That geting id from the link clicked. (front & back values). Construction bottom getting wear types (tshirt, etc).
- $('.side a').each(function() {
- $(this).on("click", function() {
- var sside = $(this).attr('id');
- });
- });
- // I need sside here. How to return it?
- $('.wtypes a').each(function() {
- $(this).on("click", function() {
- var stype = $(this).attr('id');
- return stype;
- });
- });
- // I need stype here. How to return it?
I need to have that values to reach right bolder with wear picture.
var destination = "./pictures"+stype+sside ;
How to return values from each function?