How can I select all anchor tag whose href starting with tel: ie href="tel:12334......" - anchor

some text
some text 1-800-223-7440 or for all other inquiries please feel free to
1-800-413-8840
How can I select all anchor tag whose href starting with tel: ie href="tel:+123-34......"

You want to select them by using what?
If you are using jQuery - you can write something like this: jQuery('a[href^="tel"]')

Related

Problem to input custom HTML with schema and JavaScript to individual page modx

I'm new on ModX. I've created a template variable to input custom HTML into my page. I choose Rich Text as input type for this template variable.
On the other hand, my HTML contains some meta tag like <meta itemprop="name" content="myname"> tag with schema ( some custom attributes like <div class="review" itemprop="review" itemscope="" itemtype="http://schema.org/Review"> )
So when I submit this data into page through template variable, I don't see that meta tag and custom attributes like itemprop, itemscope or script tag. They are removed or ignored by the editor.
Can someone tell me that how can I get rid from these issue? I will be great full for the help. Thanks.
There are two possible ways at least:
1) use textarea TV type instead rich text
2) it depends on your WYSIWYG editor, they allow you to exclude (not cut) the specified tags from processing

Create links in Kentico reports

I'd like to add clickable links to a Kentico Report. The report editor allows you to add all kinds of HTML mark-up in the layout, but it doesn't allow you to add HTML INSIDE of a table that you've inserted into the layout. (Or if it does, it is not obvious from the UI, or from the Kentico documentation.) I want a link to appear in each row, and the link should include a value from that row.
Clicking any of the links would open another page that shows more data about a particular record. In my case, my first column is an ID column and I want its value (in each row) to behave like a hyperlink to another page whose URL includes the clicked ID value as a parameter.
We can use jquery within our Kentico report to allow each value in a particular field to cause a link to be opened when clicked. In my case, I have a URL into which I want to embed an ID value from the report. I want to open one of the admin pages whose URL looks like the following (where 9999 is replaced with a record ID from my report):
/CMSModules/AdminControls/Pages/UIPage.aspx?elementguid=00000000-0000-abcd-0123-000000000000&objectid=9999&displaytitle=false
So let's assume the first field in the report is an ID column and we want to make the displayed ID behave like a link to some other page.
First we need jquery. Edit the report's layout in '<>Source' mode and add a script reference for jquery, such as one you can get from code.jquery.com, or just reference it locally if you have it:
<script src="/jquery-3.4.0.min.js"></script>
Next, we must find each ID field and then make it behave like a hyperlink. To do so, we find the <th> with the ID column's title, walk up to the <table>, and then find all <tr>s immediately under the <tbody>. Once we have each <tr>, we iterate through them to:
underline the ID value like a hyperlink
set the cursor to a hand like a hyperlink
add an onclick event to do open a URL (in a new tab) with my ID field's value
So here is the script. Add it just like you added the jquery script tag. (but add it after the jquery script tag)
<script>
$('th:contains("MyIDColumnTitle")').parents('table').first().children('tbody').children('tr').each(function() {
$(this).children('td').first()
.css('text-decoration','underline')
.css('cursor','pointer')
.click(function(){
var thisId = $(this).text();
var u = "/CMSModules/AdminControls/Pages/UIPage.aspx?elementguid=00000000-0000-abcd-0123-000000000000&objectid=" + thisId + "&displaytitle=false"
window.open(u,'_blank');
});
});
</script>
Keep in mind that if MyIDColumnTitle is not very unique, this script may find the wrong th and table. Modify the jquery selector to suit your needs. You may want to add a wrapping element around your report that has an element ID so you can be specific with your selector.
It wouldn't be difficult to take the same concept and use it to launch a page in a modal dialog instead.

Change page title dynamically with tag manager

I need to change page title dynamically with tag manager, it must be like the search query from google.
For example if I search in Google (organic and paid): Hotel Toronto
And the title must be: Hotel Toronto
Do you have any idea on how I can do it?
Thanks in advance!
You can change the page title by creating a custom HTML tag and set the title property
<script>
document.title = "I am title hear me roar";
</script>
Set the trigger to "Pageview->All Pageviews".
However I doubt that even with the latest changes in the way Google evaluates javascript in pages it will evaluate a title that's been changed via Javascript. That does need to stop you from trying, but the chances of success are slim.

where does the href inside an <a> tag link direct me?

If I were to put
Replace this
where does this link go to? I am using eldarion-ajax and the examples all use this link location.
Does this link to replace.html?
the div with id #replace
It probably just goes to the url "replace". like if you're at www.website.com/index.html it would go to www.website.com/replace. It's probably just a placeholder indicating you should replace it with another value.
Web URLs do not need to end in .html or such.

How do I get jQuery autocomplete to show anchor tags?

How do I get jQuery autocomplete to show <a> tags?
I'm using jQuery autocommit to search names. I would like the dropdown returned from the Server to include HTML, specifically <a> tags, so I can return the name and the email and the company each within an <a> tag.
Currently, the HTML that I return from the server is displayed in the autcommit dropdown as text and doesn't act as HTML?
Take a look at this, and see if it helps: http://forum.jquery.com/topic/using-html-in-autocomplete

Resources