Process a <p> with goquery - goquery

I'm trying to get the following element from a page with goquery
<p><strong>ALIASES: </strong>alias,1 “alias2," “alias3,”<br><strong>DOB: </strong>December 22, 1986<br><strong>NATIONALITY: </strong>Brazil<br><strong>CITIZENSHIP: </strong>Brazil<br><strong>HEIGHT:</strong> 5’10” <br><strong>WEIGHT: </strong>175 lbs<br><strong>HAIR COLOR: </strong>Brown <br><strong>EYE COLOR: </strong>Brown <br><strong>U.S SERVICE: </strong>Newark</p>
ALIASES: alias1 “alias2," “alias3,”DOB: December 22, 1986NATIONALITY: BrazilCITIZENSHIP: BrazilHEIGHT: 5’10” WEIGHT: 175 lbsHAIR COLOR: Brown EYE COLOR: Brown U.S SERVICE: Newark
Because all the text is in a p tag, I find it difficult to process it with goquery. How can I achieve this

Related

Woocommerce product regular price prefix tooltip with icon

On my woocommerce site we added a prefix for regular price, called RRP. (as you can see on the attached picture)
I would like to appear an info icon before "RRP" text, and would like to add a tooltip, if someone hover on the icon, a unique text would appear. This would be a short description, what does RRP mean.
We are using css to appear price prefix:
This is an example how we would like to see: https://www.emag.hu/samsung-galaxy-a22-mobiltelefon-kartyafuggetlen-dual-sim-128gb-lte-fekete-sm-a225fzkgeue/pd/DF5FNHMBM/?ref=prod_CMP-167737_12195_125894
del .amount::before {
margin-right: 5px;
font-weight: 400;
font-size: 13px;
}
del .amount::before {
content: 'RRP:';
}
Do you have any idea how can i do this?
photo

Is it possible to specify tr styles in Grid.js?

New to Grid.js, and by no means a css Expert.
I am trying to style alternate rows, which seems like a common use case that should be simple enough to implement, but I can't seem to get to 1st base.
It appears that I can not even apply a simple style to tr elements. There is no indication in the docs that tr styles are supported, either by using literals or style classNames.
columns: ["Name", "Email", "Phone Number"],
data: [
["John", "john#example.com", "(353) 01 222 3333"],
["Mark", "mark#gmail.com", "(01) 22 888 4444"],
["Eoin", "eoin#gmail.com", "0097 22 654 00033"],
["Sarah", "sarahcdd#gmail.com", "+322 876 1233"],
["Afshin", "afshin#mail.com", "(353) 22 87 8356"]
],
style: {
tr: {
'background-color': '#69c'
}
}
}).render(document.getElementById("wrapper"));
And if I can't get a simple style to work, there's no hope of getting this to work:
tr:nth-child(even) {
background-color: Lightgreen;
}
Turns out, styling alternating rows is not that hard. This sample helped:
https://codesandbox.io/s/gridjs-bpf9g?file=/src/styles.css:0-57
It's not necessary to include style: class. The css tr selector works by itself.
new gridjs.Grid({
columns: ["Name", "Email", "Phone Number"],
data: [
["John", "john#example.com", "(353) 01 222 3333"],
["Mark", "mark#gmail.com", "(01) 22 888 4444"],
["Eoin", "eoin#gmail.com", "0097 22 654 00033"],
["Sarah", "sarahcdd#gmail.com", "+322 876 1233"],
["Afshin", "afshin#mail.com", "(353) 22 87 8356"]
]
}).render(document.getElementById("wrapper"));
/* styles.css */
tr:nth-of-type(even) td {
background: #fff;
}
tr:nth-of-type(odd) td {
background: #fea;
}

CSS is not rendering on webpage

I have a webpage that uses an external CSS file for rendering my web pages on my site. All of my pages pretty much follow the same format as far as the layout is concerned and I have different sections in the Site.css file for each page. For some reason, one web page is not rendering the CSS correctly. I have a div defined with an Id and it isn't recognizing the id in the div even though it is defined in the CSS file. If I use a different id then it renders according to that Id's CSS. Specifically, the background color is not being set. Here is a screen shot of the site with the CSS. As you can see from this screen shot, the <div id="Devotions"> is not picking up the CSS.
CSS Issue
If I change the Id to ChristianFormaion, the page renders as I want it and the CSS is displayed as shown in the screen shot below.
Css no Issue
In the View, Devotions appears in the dropdown when I set the Id for the div. Here is the view code:
#{
ViewBag.Title = "Devotions";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div id="Devotions">
<h1 class="devotions_center">DEVOTIONS</h1>
<div class="devotions_body">
<p><img src="~/images/Devotions_cross.jpg" alt="Assumption B.V.M." width="53" height="79" align="right" class="padding15" /></p>
<h2><a name="CharismaticPrayerGroup" id="CharismaticPrayerGroup"></a>Charismatic Prayer Group</h2>
<p>The Assumption Charismatic Prayer Group has been meeting every Monday evening since 1973 to offer praise, thanksgiving and petitions to our God, Father, Son and Holy Spirit. The purpose of our prayer meeting is to seek a close personal relationship with Jesus and experience the working of the Holy Spirit in our lives in a deeper way. The word “charismatic” refers to the charisms or gifts of the Holy Spirit which we prayerfully seek through praise, both verbally and in song, scripture reading, sharing of answered prayer, prophecy and petition. Some of our members have been involved for over forty years and have experienced many answers to prayer and personal transformation. We meet every Monday evening at 7:15 in the Rectory Meeting Room. If you have any questions, contact Jean Ambs at 215-355-4974.</p>
</div>
<div class="devotions_body">
<h2><a name="Exposition" id="Exposition"></a>Eucharistic Adoration</h2>
<p>Eucharistic Adoration is held every Tuesday, beginning immediately after the 8:30 a.m. Mass and concluding at 6:45 p.m. with Evening Prayer from “The Liturgy of the Hours” followed by Benediction. Stop in for a visit any time. Better still, consider signing up for a holy hour of personal prayer before the Blessed Sacrament. Bring your needs to the Lord! For more information contact Deacon Eric at 215-357-1221, ext. 24, or email deaconeric.abvm#gmail.com</p>
</div>
<div class="devotions_body">
<p><img src="~/images/Devotions_bible.jpg" alt="Assumption B.V.M." width="86" height="73" align="left" class="padding15" /></p>
<h2><a name="FaithSharing" id="FaithSharing"></a>Faith Sharing</h2>
<p>A Bible/Faith Sharing Group meets on Wednesday mornings after the 8:30 Mass in the Mary Chapel, September through May. We use the “Word Among Us” monthly publication and focus on the Scripture for the following Sunday. Come grow with us in gaining insight into readings for Mass. Everyone is invited to join our informal group. Contact Theresa Poitras at 215-357-3933 or email theresaj38#verizon.net</p>
</div>
<div class="devotions_body">
<h2><img src="~/images/Devotions_rosary.jpg" alt="Assumption B.V.M." width="172" height="89" align="right" /><a name="Rosary" id="Rosary"></a>Rosary</h2>
<p>Prayed in Church at 8:00 AM before the 8:30 AM daily Mass.</p>
<h2><a name="PrayerPhoneTree" id="PrayerPhoneTree"></a>Prayer Line</h2>
<p>A group of parishioners volunteer to pray for the special intentions of our parish. If you have a request that you would like prayers for, please call Ginger Henry at 215-357-3394.</p>
</div>
<div class="devotions_body">
<h2><a name="Miraculous" id="Miraculous"></a>Miraculous Medal Novena</h2>
<p>Prayed in Church Thursday mornings following the 8:30 AM Mass.</p>
</div>
<div class="devotions_body">
<h2><img src="~/images/Devotions_Mary.jpg" alt="Assumption B.V.M." width="84" height="96" align="right" /><a name="LegionofMary" id="LegionofMary"></a>Legion of Mary</h2>
<p>The Legion of Mary is a lay Catholic organization founded by the Servant of God, Frank Duff, in Dublin, Ireland on September 7, 1921. Long before the recognition that the laity is vital to the work of the Catholic Church after Vatican Council II, the Legion of Mary, as a lay apostolic association with the approval of the Catholic Church and the intercession of Mary Immaculate, seeks the holiness of its members as they actively invite other people to holiness by doing the works assigned them by their Spiritual Director. In our parish, Our Lady of the Assumption Praesidium, the basic unit of the Legion, meets on Thursdays at 6:45 p.m. in the Mary Chapel, which is to the right of the church vestibule as you enter our church.</p>
<p>Currently, Father Mike Davis, Spiritual Director, asks the legionaries to visit homebound parishioners, residents of nursing homes and to bring the Pilgrim Virgin Statue to parishioners’ homes as requested. The primary purpose of the Pilgrim Virgin Statue home visitation is to help families to respond to the requests of the Blessed Mother Mary during the 1917 apparitions at Fatima: to return to God, make reparation for sins and to pray the Rosary for Peace. For more information, please contact Elaine Flood at 215-962-4312 or email lainey39forever#yahoo.com</p>
</div>
</div>
Here is the CSS in the Site.css file for devotions:
/* ========================================================================================*/
/* devotions.aspx */
#Devotions {
background-color: #dee4fe;
padding: 5px;
}
.devotions_body {
padding: 5px 15px 15px 15px;
margin-left: auto;
margin-right: auto;
}
.devotions_center {
text-align: center;
}
.devotions_left {
text-align: left;
}
.devotions_right {
text-align: right;
}
.devotions_color {
color: #005bac;
color: #006699;
}
Here is the CSS for the ChristianFormation:
/* ========================================================================================*/
/* christianformation.aspx */
#ChristianFormation {
background-color: #dee4fe;
padding: 5px;
}
.christianformation {
color: #B4C1E3;
border-width: 0;
padding-right: 3px;
vertical-align: middle;
}
.christianformation_hr {
margin-bottom: 15px;
border-top: 1px solid black;
}
Any help in identifying why the Devotions CSS is not rendering is greatly appreciated.

Change selection color of whole page

I'm currently using
::selection {
background: rgba(3, 35, 75, .7);
}
But that only changes the color/opacity when I've selected a text or something. It goes to the default color/opacity on blank spaces etc when I press CTRL+A.
How do I change this?
Example:
Example image
Note that the gray selection is blue, it just acts as I've tabbed out.
I don't know if it is good practice, but it will work with * selector.
*::selection {
background: rgba(3, 35, 75, .7);
}
try replacing all the numbers, the last one is the important one to replace.

Extract of Bootstrap 3 CSS crashing IE9

The following page was constantly crashing for me in IE9 on Windows 7:
http://www.studyzone.tv/test1.html
After much testing around, it turns out the line-height line in the Bootstrap 3 CSS File was causing the crash...or at least conflicting with JWPlayer somehow, and between them, causing the crash!
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.428571429; /* THIS IS THE LINE THAT CUASES THE ERROR*/
color: #333333;
background-color: #ffffff;
}
I have duplicated the CSS file and commented the line out and it fixes the problem, as can be seen in this link:
http://www.studyzone.tv/test2.html
I suppose I have two questions:
Why is this line causing the crash? Have I really found the problem, or do I have a conflict somewhere else?
How can I fix the issue without commenting out the original CSS file which is obviously bad practice?
It most likely has to do with a clash in HTML5 mode in IE between our HTML5 player and Bootstrap.
You are setting primary to flash inside of the playlist block, so it is never taking effect.
The set up should be:
<script type="text/javascript">
jwplayer("jwplayer").setup({
playlist: [{
image: "http://www.studyzone.tv/media/lesson002/lesson002-still.jpg",
sources: [
{ file: "http://www.studyzone.tv/media/lesson002/lesson002-lq.mp4", label: "360p" },
{ file: "http://www.studyzone.tv/media/lesson002/lesson002-hq.mp4", label: "720p HD" }
],
title: "Play video"
}],
width: "700",
aspectratio: "16:9",
primary: "flash"
});
</script>
This should solve the issue and you won't have to comment anything out either.

Resources