I Believe That The Education And Entertainment Should Be Available For People Who Deserve It.
Sunday, 13 September 2020
JQUERY Tutorial | Add Unique Count On Repeated HTML Elements Without Bac...
Automatically add count in repeated elements using only JQUERY.
Boostrap code with JQUERY link:-
https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_default&stacked=h
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
In this video, I am going to show how to add count in incrementing order in elements.
I created an empty html page as you can see.
I am lazy so I am going to copy some html code from w3schools. Link in the description.
In that code, they manually added 1,2,3. Which might take a lot of time if you add one by one.
Let me just remove Order and add LIST in h3 tag.
Now, they already provided one jquery link which is necessary.
Now create a script tag, make sure that it is below those repeated elements.
Create a random function, and call it.
Now, as soon as page loads, it will show an alert message.
After that, remove alert.
If you observe the pattern, H3 tag comes after the class called “col-sm-4”.
So, we shall now call then one by one using jquery.
We have to append the number, so we shall need an integer and increase it by 1 each time.
Don’t forget to like, share and subscribe.
Thanks for watching.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment