I was trying to put all the top posters variables into one module (in this case, the overall top posters widget module) but it parsed me only the results of the top postersHere's now my code looks like

I was trying to put all of them together and use jQuery to separate them into tabs. Everything is working fine but then I notice that the results are wrongly parsed.I checked on the variables itself and they are the same code in all three different intervals, which are

Code:

{POSTER.NAME}

Code:

{POSTER.BARRE}

which then prompts me to believe that because it's in the overall top posters template, it shows only the overall top posters statistics.

I may have been doing the wrong thing from the very beginning.If so, what should be the right way of fetching the right statistics?

For now, I'm only letting it to return the function in the console. Now if you open the console of your browser (hopefully you're using Chrome or Safari or any other browsers that has developer tools), you'll notice that this selector, ".placestats>tbody:nth-child(2)>tr>td:nth-child(2)" of any of the similar variables fetched me only the first tr child of each of the tbody.

I checked http://api.jquery.com/child-selector/ and the > symbol means all the children of the parent, not just the first child of the parent. So now I'm stumped. Any help in the codes please?

Are you using variables from the Templates in Modules or HTML pages ? This will not work, unfortunately. To understand Selectors in jQuery you must first understand Selectors in Cascading Style Sheets.

">" Means your selecting the direct child of the parent. This means that you will not be able to select the same element inside that child. Your next problem is that you're using ::nth-child. In most cases this is unnecessary, especially when you can add an ID or Classname to these elements.

I would go through the templates and add an Id to the parts of the statistics that I want to fetch. This way you'll have a much more accurate selection.

I guess I should now rename the topic title as Fetching Statistics now, as I have now decided to use this method instead of using the variables used in the modules.

w3schools wrote:div>p - Selects all <p> elements where the parent is a <div> element

Does this not mean that this selector selects all the available <p> inside of the <div> element?

And I had to use the :nth-child selector as the templates for statistics is not available. I'm fetching my statistics from the /statistics page (Invision) by loading ( jQuery load() ) the selector that I've specified inside of a div that I've placed in my HTML page (this linked page is just a test).

Edit: Sorry that the topic name isn't changed cause I used the preview button and forget changing it back.

Second edit: I've solved it. Anyone interested in knowing how to solve can refer to that HTML page link I've posted previously.To mods, you may now lock this topic. Thank you.