0
$.each(category, function (index, value) {
var addnew = '<div class="about">';
    addnew += '<div class="profile-title">';
    addnew += '<span>';
    addnew += '</span>';
    addnew += '</div>';
    addnew += '</div>';
});

I just want to get the value and put it in the SPAN TAG How to do that ?

6
  • why you put you jQuery inside a tilt sign? Commented Feb 27, 2017 at 14:46
  • sorry typo only Commented Feb 27, 2017 at 14:48
  • Whats your Problem @DaveManuel? Commented Feb 27, 2017 at 14:49
  • @freedomn-m sorry, did not get you. Commented Feb 27, 2017 at 14:51
  • hello I just want to get the values in the category it is an array loop it and put in the span tag Commented Feb 27, 2017 at 14:51

1 Answer 1

2

you should use my code as below if you have the category array in category variable::

$.each(category, function (index, value) {
    var addnew = '<div class="about">';
    addnew += '<div class="profile-title">';
    addnew += '<span>' + value + '</span>';
    addnew += '</div>';
    addnew += '</div>';
});
Sign up to request clarification or add additional context in comments.

2 Comments

@DaveManuel Yes, please check.
I have probkwn un my array now

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.