Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var clickTarget = 2;
- $("button").click(function () {
- var selector = "." + clickTarget.toString();
- $(selector).css("display","inherit");
- $(selector).show();
- clickTarget++;
- });
- <html>
- <head>
- </head>
- <body>
- <div class="row">hi</div>
- <div class="row hidden">hi2</div>
- <div class="row hidden">hi3</div>
- <button>Add Row</button>
- </body>
- </html>
- $(document).ready(function(){
- $(".hidden").hide();
- $("button").click(function () {
- $(".row.hidden").eq(0).css("display","inherit");
- $(".row.hidden").eq(0).removeClass('hidden').show();
- });
- });
- $("button").click(function () {
- $(".2").show();
- $('button').unbind('click').click(function(){
- $('.3').show();
- });
- });
- $(document).ready(function() {
- $("button").click(function() {
- $(".hidden").first().removeClass('hidden');
- });
- });
- $('button').on('click', function() {
- $row = $('div.row:first').clone();
- $('div.wraper').append($row);
- });
Add Comment
Please, Sign In to add comment