We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is my page: var html = "<div class='time_head'>time_head content1</div>" + "<div class='blockfix'>blockfix1</div>" + "<div class='blockfix'>blockfix2</div>" + "<div class='time_head'>time_head content2</div>" + "<div class='blockfix'>blockfix3</div>" + "<div class='blockfix'>blockfix4</div>" + "<div class='blockfix'>blockfix5</div>";
var html =
"<div class='time_head'>time_head content1</div>"
+ "<div class='blockfix'>blockfix1</div>"
+ "<div class='blockfix'>blockfix2</div>"
+ "<div class='time_head'>time_head content2</div>"
+ "<div class='blockfix'>blockfix3</div>"
+ "<div class='blockfix'>blockfix4</div>"
+ "<div class='blockfix'>blockfix5</div>";
i need to get the results in that order like : TIME_HEAD CONTENT1 ----blockfix1 ----blockfix2 TIME_HEAD CONTENT2 ----blockfix3 ----blockfix4
TIME_HEAD CONTENT1
----blockfix1
----blockfix2
TIME_HEAD CONTENT2
----blockfix3
----blockfix4
this what i tried so far: x(html, { head: ['.time_head'], games: ['.blockfix']
x(html, {
head: ['.time_head'],
games: ['.blockfix']
})(function (err, obj) { console.log(obj['head']); console.log(obj['games']); });
})(function (err, obj) {
console.log(obj['head']);
console.log(obj['games']);
});
but the result is:
[ 'time_head content1', 'time_head content2' ] [ 'blockfix1', 'blockfix2', 'blockfix3', 'blockfix4', 'blockfix5' ]
The text was updated successfully, but these errors were encountered:
Is the number of time_head divs consistent?
Sorry, something went wrong.
No.. they are dates of events
I think the solution is to capture them non-sequentially then sort them is a post-processing step.
+1
No branches or pull requests
Subject of the issue
this is my page:
var html =
"<div class='time_head'>time_head content1</div>"
+ "<div class='blockfix'>blockfix1</div>"
+ "<div class='blockfix'>blockfix2</div>"
+ "<div class='time_head'>time_head content2</div>"
+ "<div class='blockfix'>blockfix3</div>"
+ "<div class='blockfix'>blockfix4</div>"
+ "<div class='blockfix'>blockfix5</div>";
i need to get the results in that order like :
TIME_HEAD CONTENT1
----blockfix1
----blockfix2
TIME_HEAD CONTENT2
----blockfix3
----blockfix4
this what i tried so far:
x(html, {
head: ['.time_head'],
games: ['.blockfix']
})(function (err, obj) {
console.log(obj['head']);
console.log(obj['games']);
});
Actual behaviour
but the result is:
The text was updated successfully, but these errors were encountered: