cheerio.js - selector for element
up vote
0
down vote
favorite
I am having difficulty determining the selector to get the inner "dd" tags for the second "dl" in this page
This would be the "Business Contact Information" section. Can anyone point me to a solution? I can get the first "dl" just fine.
See snippet below. Normally I would use $('#addrcontent' dd).each(); however, the '#addrcontent' is used in some code at the top of the page and this messes up the cheerio selector.
cheerio
add a comment |
up vote
0
down vote
favorite
I am having difficulty determining the selector to get the inner "dd" tags for the second "dl" in this page
This would be the "Business Contact Information" section. Can anyone point me to a solution? I can get the first "dl" just fine.
See snippet below. Normally I would use $('#addrcontent' dd).each(); however, the '#addrcontent' is used in some code at the top of the page and this messes up the cheerio selector.
cheerio
You can do something like:$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.
– pguardiario
Nov 11 at 0:19
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am having difficulty determining the selector to get the inner "dd" tags for the second "dl" in this page
This would be the "Business Contact Information" section. Can anyone point me to a solution? I can get the first "dl" just fine.
See snippet below. Normally I would use $('#addrcontent' dd).each(); however, the '#addrcontent' is used in some code at the top of the page and this messes up the cheerio selector.
cheerio
I am having difficulty determining the selector to get the inner "dd" tags for the second "dl" in this page
This would be the "Business Contact Information" section. Can anyone point me to a solution? I can get the first "dl" just fine.
See snippet below. Normally I would use $('#addrcontent' dd).each(); however, the '#addrcontent' is used in some code at the top of the page and this messes up the cheerio selector.
cheerio
cheerio
edited Nov 11 at 0:18
Al Fahad
755821
755821
asked Nov 10 at 17:14
afk
162
162
You can do something like:$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.
– pguardiario
Nov 11 at 0:19
add a comment |
You can do something like:$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.
– pguardiario
Nov 11 at 0:19
You can do something like:
$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.– pguardiario
Nov 11 at 0:19
You can do something like:
$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.– pguardiario
Nov 11 at 0:19
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241421%2fcheerio-js-selector-for-element%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can do something like:
$('dt:contains("Organization") + dd')
That will get the dd right next to that dt.– pguardiario
Nov 11 at 0:19