Creating a link to a javascript function - javascript

I'd like to link to a specific button that is activated with js.
Here is the page
Right now the "Base Vessel" image collection (bottom of page) is displayed when opening the page.
I want to be able to display directly "Fitness center" image collection instead whith my link and also scroll down.
Is this possible to code this in a link?

Related

How to trigger Elementor Popup based on specific url

I have a one page website with different sections and few simple popup which are triggered when user clicks on link/button on a page. I want same popup to open when user access website with a specific url example
www.example.com/#menu
www.example.com/#privacy-policy
I found setting under Elementor popup when arriving from specific URL but this option is not working for me.
I can do same using custom JavaScript unless it will not work with elementor feature.
I tried different combination of url such as https://www.example.com/#menu #menu https://example.com/#menu
its not working for any combination.
I did keep condition setting also as Entire site etc..
Just need a point as i could not find any specify article regarding this as most of the article are about how to trigger popup from link.
Set a class on the section you want.
Go to Popup triggers
Check "On scroll to element" en put the class in.
Now the pop up show op when you scroll on the section.

Javascript/CSS/HTML mouseover show remote page with no clickable link

I have a section of a div container text that I'm trying to 'preview' another page, or at least show it when the mouse is over specific text - I don't want the actual text to be clickable since I need it to remain on the 'main' page
I've messed around using some custom CSS's to 'preview' data, locally, and provide a remote img src, but I cannot seem to find any examples to do this for a page.
You can get thumbnails of those pages that you want to show and when they hover that text you can show them that thumbnails. Tt is kind of tricking user since they are not actually seeing the page.

Loading Images From a Link without Refreshing Page

I created some widgets in my Wordpress theme, I want create representation for some of my widget fields, For example I create Twitter widget, it is contain the VIDEO_ID field, I created link named (info),
I want when anyone don't Know how get twitter VIDEO_ID, Then click on (info) link, to show it the explanation image on screen without refresh page.
How I can Show images by clicking on info link to show images without refresh the page and then click on close button to close the image?
use a Modal to present your image.
You can refer to bootstrap modal http://www.w3schools.com/bootstrap/bootstrap_modal.asp

Adding a button to favorites that inserts javascript

I've seen a few sites offer a tool that allows users to drag a button to their favorites bar and then when they click on it, no matter what site they are on, a div of some form would pop up on the page. When I looked at the url of the button that I had dragged onto my favorites bar, I realized that it was actually javascript code.
How is this effect accomplished?
This is called a "bookmarklet". You can create a hyperlink that contains the necessary JavaScript code, which they drag into their bookmark toolbar.
It is as simple as creating a hyperlink on your page containing the JavaScript as its href. For example:
<a href='javascript:alert("you clicked a bookmarklet");'>Drag me to your bookmarks</a>
See it in action at JSFiddle...
In order to make it look like a button, CSS is applied (borders, background color, etc.).
Try typing this in the location bar of your browser, when you press return the javascript will execute automatically:
javascript:alert('hi');
Bookmark 'scriptlets' work using the same notion. If you have an <A> tag as follows on your page:
<a href="javascript:alert('hi');" >Hello Scriptlet</a>
And you drag it onto your bookmarks bar, you'll create a scriptlet with the same behaviour.

figuring out this Javascript code

I am trying to figure out how the get the featured area
at http://blueoceanportfolios.com to link to webpages rather than displaying it within the featured box on the left .
This area is using JS file to display the videos on content in the featured box when different items on the menu are clicked, here is the working example :
http://www.blueoceanportfolios.com/company/
Okay ,
The problem: Loading a new webpage rather than displaying the content at featured box at the homepage of above website
Tried solutions: linking to javascript functions like onclick="window.location="http://someplace.com";" etc but still the content loads up in the featured box ,
try clicking on 2) it displays stackoverflow.com rather than loading new page.
Any suggestions ?
This:
<script type="text/javascript">
onclick="window.location="http://someplace.com";"
</script>
... is not the way to add event handlers to an element. If you want those anchors to link to a web page, put the URL in the href attribute like any normal link:
Link text

Categories