How to trigger Elementor Popup based on specific url - javascript

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.

Related

Connect with google plus button

I have implemented Connect with Google plus on a website. It is working fine except the following case: Consider I have logged in to Google account and then I visit my website I can see the popup from Google which is according to the snipped screen shot as below
I don't want this popup to be visible ever. Any
The best way to deal with this problem is by creating a simple JavaScript code and putting it in your pages. If the problem occurs on all pages, create a master file {name}.js and import it on all relevant pages. Right click on the bar, and choose "Inspect Element". Note down the div id/class name and cancel the inspect element dialog. Next, create a JS script, which states onLoad, the div box in concern will not be displayed.

how to make a pop up Window which can be closed by clicking only

I have a website which is based on technology products reviews. I have many unique visitors every day. I use a company to earn some money. They give advertisement in my website and when my visitors click them i got some revenue which I used to pay my domain bill.
Now I want every visitor will click my ads. So I want a pop up Window. When any visitor will enter in my site he will be showed an pop up Window where i place my ad and he can only enter if he click that ads. It's like looking system.
So can it be done?
You can display a div which covers your website. This div contains your ad. You can define a close-image to hide the div or also you can react with the onClick-Event in the div.
you can use a modal div at body onload or with jQuery at document.ready
then If the visitor click close the div and they can visit your page, in another case, if click close you redirect to another page (document.location), for example, explaining why they have to click on the ads
You can make a cookie:isClicked, value false
If the user click on your ad(popup), you set this on true.
Now you control with your main page: is the cookie true?
If yes, you allow the user to load the page.

Grabbing images from a page for Pinterest pinit button

I am using Pinterest share button for my website. The expected behavior i want is whenever i press pin it button it shall show me all iamges on the page and give me an option to pin one from them.
Just like pin it button on http://www.dogster.com/the-scoop/minkyu-lee-adam-and-dog-nominated-for-an-oscar
However, pin it api present at http://pinterest.com/about/goodies/ needs a hardcode media url for pinning.
I am not sure how to grab this behavior from Pinterest, can anyone help me with this ?
Found it:
http://business.pinterest.com/widget-builder/#do_pin_it_button
It does give me the desired behavior. It was totally hidden from dev stuff at Pinterest

How to link to a "tab" on my website

I have made tabs on my site. By tabs I mean the navigation links, rather then loading a new page use some java script and css to just switch to another tab containing more content. I'm wondering how I would be able to link to a specific page when it's done like this?
My code is similar to this one:
Using jquery easyui, how to create a tab by a link which is in a tab?
Edit: http://fogest.net16.net/righttoweb/ <<< There is a link to the site. Look at the tabs. How would I link to the page of one of those tabs?
Add anchors to the end of your URL, ie http://URL/righttoweb#about and on $(document).ready() block of code pick up the anchor and using a hash table figure out what tab needs to be selected.
Also make sure when users click on your tabs, you update the anchor in the top bar as well, in order to preserve which tab was selected if the user decides to bookmark the URL or send it to someone else
edit:
Well every time a user clicks on one of your tabs, with the onClick event you need to alter the navigation history of your page, for ex:
window.history.pushState("object or string", "Some Title", "#tab" + tabname);
This will enable the back/forward buttons to work
then everytime the page loads you need to
$(document).ready(function() {
if(window.location.href.indexOf('#'))
updateTab(location.hash);
});
function updateTab(tabname) {
your logic to update tab...
}
Hope this makes sense

Using the BACK button to revert to the previous state of the page

I am trying a new functionality for my web site. I want to do simple navigation by hiding/showing <div> elements.
For example, when a user clicks a "details" button on some product, I want to hide the main <div> and show the <div> containing the details for the product.
The problem is that to go back to the previous "page", I have to undo all the display/visibility style changes, which is ok if the user clicks the "close" button in the newly opened <div>. But most users will hit the BACK button.
Is there a way to make the BACK button go back to the previous "state" of the page i.e., undo the visibility/display changes?
Thanks.
Yes. What you're looking for is called AJAX browser history.
There are a few open implementations out there, like RSH as well as plugins/modules for frameworks like jQuery and YUI.
to answer the question of your title (that's what I was looking for)
Using the BACK button to revert to the previous state of the page
and from the link from #reach4thelasers's answer, you have to set up a timer and check again and again the current anchor:
//On load page, init the timer which check if the there are anchor changes each 300 ms
$().ready(function(){
setInterval("checkAnchor()", 300);
});
because there's no Javascript callback triggered when the BACK button is pressed and only the anchor is changed ...
--
by the way, the pattern you're talking about is now known as Single Page Interface !
You need to add an anchor to the URL whenever a change is made
www.site.com/page.html#anchor1
This will allow the browser to maintain the pages in its history. I implemented it in my current site after following this tutorial, which works great and gives you a good understanding of what you need to do:
http://yensdesign.com/2008/11/creating-ajax-websites-based-on-anchor-navigation/
Your example in the comments won't work, because it works like this:
Page Loaded
Page Changed, Add Anchor to URL (back button takes you back to back to 1)
Page Changed, Anchor Changed (back button button takes you back to 2)
Page Changed, Anchor Changed (back button button takes you back to 3)
.... and so on and so on..
If there is, it sounds like a pretty evil thing to do from a UX perspective. Why don't you design a "back" button into your application, and use design to make it obvious to the user that they should use your application's back button instead of the browser.
By "use design," I mean make your application look like a self-sufficient user interface inside of the browser, so the user's eye stays within your page, and not up on the browser chrome, when they are looking for controls to interact with your app.
You can do this with anchors, which is how it's done in a lot of flash applications, or other apps that don't go from page to page. Facebook uses this technique pretty liberally. Each time the user clicks on a link that should go in their history, change the anchor on the page.
So say my home page link is:
http://www.mysite.com/#homepage
For the link that works your javascript magic, do this:
My Other Page
This will send the user to http://www.mysite.com/#otherpage where clicking the back button will go back to http://www.mysite.com/#homepage. Then you just have to read the anchors with
window.location.hash
to figure out which page you're supposed to be on.
Take a look to this tutorial based on ItsNat a Java web framework focused on Single Page Interface web sites

Categories