I am using a Wordpress 3rd party theme and it limits me because for customization i need to (guess what) pay even more... even for small things like this...
I have this class which shows me the "€" currency sign after the price "1000 €"
But i have a price range like this: 1000 - 2000 €
How can I put the currency sign after the 1000, so it will look like this (1000 € - 2000 €) ??
HTML code :
<span class="post-rice"><span class="text">Prices:</span>6000 - 7000</span>
At this moment i use this CSS code:
.post-rice:after{content:"€";}
.post-rice:before{content:"€";}
But with those CSS codes I have the price like this:( € 1000 - 2000 € ) ... The :before method is not correct. Can you please give me an advice ?
Something like this is probably what you are looking for. Right now the HTML interprets your span as one block of text, so the :before selector will put content in front of the whole text block.
HTML
<span class="post-rice">
<span class="text">Prices:</span>
<span class="price">6000</span> - <span class="price">7000</span>
</span>
CSS
.price::after {
content: "€" // alternatively use "content: €"
}
Related
I have to figure out how to display paragraphs that each word in the paragraph has its own hover function(comment).
Here is how the page looks like right now. I want to display the left text in paragraphs as I have in the right text. the first one is the translation and the second one is the original text.
The thing is that I need to have a hover function on the first text for every word. It is already done this is how it looks and it's working for each word:
so to explain it better we have paragraphs and every word in paragraphs has to have the hover function with some comments.
The main task is to display the words in paragraphs and not like it is the first picture, but like this:
This is my code right now which displays text like it's in the first picture, so not in paragraphs but every word on a new line with hover function:
declare function letter:text_orig($node as node(), $model as map())
{
let $resource := collection('/db/apps/Tobi-oshki/data')
let $xml_id := letter:text_people('/db/apps/Tobi-oshki/data')
for $rs in $resource//tei:rs
for $id in $xml_id
return
if (data($rs/#key) eq $id)
then
<html>
<div data-toggle="tooltip" data-placement="top"
title="{letter:text_lem(data($rs/#key))}"> {$rs}</div>
</html>
else
"" };
the XML file looks like this:
<div type="original" xml:lang="ka">
<pb f="1r" n="1" xml:id="pb-orig-1r-1" facs="#zone-pb-1r-1"/>
<lb n="2" xml:id="l-1"/>
<ab>[7125.5]<rs type="pers" key="320">ენემ<supplied reason="lost">ეს</supplied>[7125.1]არისთა</rs>,
<rs type="pers" key="1643">მეფისა </rs>
<rs type="pers" key="251">თეზბეთ</rs>,
<rs type="pers" key="243">ზემო-კერძო</rs>
<rs type="pers" key="245">ასერსა</rs>.
</ab>
so ab tag is a paragraph and rs tag is a word.
Do you have any idea how can I display paragraphs with each word having its hover function?
It sounds to me as if you want e.g.
for $ab in $resource//tei:ab
return
<p>
{
for $rs in $ab/tei:rs
return <span data-toggle="tooltip" data-placement="top"
title="{letter:text_lem(data($rs/#key))}">{$rs/data()}</span>
}
</p>
I haven't figured out what the id check is doing so you might need to adjust the above, but it "maps" an ab to a p element.
I'm scraping an HTML page but I'm trying to get one section of the page. There are no classes, id's or anything super useful I can plug into Cheerio I feel like (I'm new to this, so I know my ignorance plays a part).
The code looks like this.
<b> Here's some text I don't want</b>
<b> More text I don't want</b>
<hr style="width:90%; padding: 0>
<b> text I want </b>
<b> text I want </b>
<b> text I want </b>
<b> text I want </b>
<hr style="width:90%; padding: 0>
<b> Here's some text I don't want</b>
<b> More text I don't want</b>
Is there a way to grab the HTML between the two <hr> elements with Cheerio? Both elements are exactly the same.
You can start at the first hr and iterate next() until you get to the second one:
let el = $('hr').first()
while(el = el.next()){
if(el.length === 0 || el.prop('tagName') === 'HR') break
text += el.text() + "\n"
}
If you can ascertain which nth to use you could try nth-of-type selector e.g.
hr:nth-of-type(1)
You might also be able to use nth-child
i want to find all timecodes in my content area and build a simple link around it, so i can jump to a specific timecode on my Wordpress Mediaelement.
How can I do this so it finally looks like:
<div class="timecodes">
<li>
**<a class="go-to-time">**15:30**</a>** "Title"
</li>
</div>
I figured it out by myself, here is my solution:
var str=document.getElementById("timecodes").innerHTML;
var n=str.replace(/[0-9][0-9][:][0-9][0-9]/gi,function myFunction(x){return "<a class='go-to-time'>" + x + "</a>";});
document.getElementById("timecodes").innerHTML=n;
I need to hide the +100 or -100 price next to the values in my option field.
The preview for the form looks like this with the prices under accommodations:
http://trailtalkpc.com/trailtalkwp/?gf_page=preview&id=3
I tried to target the prices in CSS and use {display:none;} to hide them but am having trouble with it. So far I've been able to target the options with this:
.medium.gfield_select {display:none;}
This targets the entire drop-down menu. Anyone know how to target the prices from here? Here is the code I have been looking through to target the prices:
<select name="input_12" id="input_3_12" class="medium gfield_select"
tabindex="11">
<option value="Bare Bones (No Accommodation Needed)|2500" price="">
Bare Bones (No Accommodation Needed) </option><option value="Washington
School House: Town House|5000" price=" +$2,500.00">Washington School House:
Town House +$2,500.00</option><option value="Newpark Resort: 1 Room
Suite|4000" price=" +$1,500.00">Newpark Resort: 1 Room Suite
+$1,500.00</option><option value="Newpark Resort: (Family) Townhouse|4500"
price=" +$2,000.00">Newpark Resort: (Family) Townhouse +$2,000.00</option>
<option value="Waldorf Astoria: King Suite|4000" price=" +$1,500.00">Waldorf
Astoria: King Suite +$1,500.00</option>
</select>
Thanks!
Jen
Use the following code in your theme's footer or within GF HTML Field. Worked for me.
<script type="text/javascript">
function gform_format_option_label( fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId ) {
return fieldLabel;
}
</script>
Directly assinging css to part of text is not possible. You need to run a javascript after form load which will wrap the price inside span. Assign a class to span and define display:none for span class.
I have the following html:
<span wicket:id="votevaluenotifier">
<label name="currentVoteValue" id="currentVoteValue" wicket:id="currentVoteValue" />%
</span>
I'm trying to style the result in CSS using:
.currentVoteValue
{color:#CC3300;
}
but no joy. I know I'm missing something obvious but what? I tried using votevaluenotifier instead of currentVoteValue but no dice.
Apologies - I'm a bit of CSS newbie.
I don't know wicket, but if you have
<label id="currentVoteValue">
you should style it using
#currentVoteValue {
color:#CC3300;
}
because # begins an ID selector and . a class selector