question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Populate count from element data

See original GitHub issue

I’m looking for a way to populate count directly through HTML.

Something like <div class="share" data-facebook-count="2" data-pinterest-count="4"> etc.

Any ideas appreciated… I don’t really want to modify the jssocials.js to do this, but I think there is no other way? It would be nice if there was some function I could override to achieve this.

Thanks a lot for any help!

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
otterslidecommented, Mar 18, 2016

Usually most people need only one share item, but I have a page with 15 of them. It’s a summary of other pages on my site that can be shared. It doesn’t make sense to let the client retrieve 5 different counts for 15 items, they will have to request 75 URLs. That’s a lot of load on mobile data for mobile users, and will slow everything down. If I keep my own counts in my database, I can provide them with the page load and speed up the load time significantly.

0reactions
tergracommented, Nov 16, 2016

@otterslide I have the same use case as yours. So did you finally manage to put all the counts in your database to retrieve them faster ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to populate a list with items.count() from a queryset ...
The database items has a datetime field wich i want to "sort on". What i really want is to populate a list like...
Read more >
How to Count Specific Items in Excel List - Contextures
This video tutorial shows how to use the COUNTIF function to count the number of cells that contain a specific string of text,...
Read more >
Ways to count cells in a range of data - Microsoft Support
Ways to count cells in a range of data · Select the cell where you want the result to appear. · On the...
Read more >
R Is Not So Hard! A Tutorial, Part 15: Counting Elements in a ...
A Tutorial, Part 15: Counting Elements in a Data Set. by guest contributer 10 ... Here we create two functions; one for finding...
Read more >
Count Number of List Elements in R - GeeksforGeeks
Create a list with vectors/list/range operator; Find the count of elements using the length and lengths function. Syntax: list(value1,value2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found