jquery - Limit appended items to x number -


I am working on a project and it seems that a wall is struck What I am trying to achieve, When a button is clicked, then a div with class = "test" should be added to a div, however I want it to be limited to only 5x so that if there is 5 divisions with orbit = "test" , Then instead of adding a warning is shown.

I have it: click on hi

gt;'}}}}) ;

However this item keeps going after number 5 ... Nobody knows what I am doing wrong? Thanks so much in advance!

Your question_row variable is slightly off:

  var question_row = $ ('# campaign_builder_questions_area. Test');  

question_oro is now an array of your assigned class - check the .length of question_row Now.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -