Close button like facebook wall or youtube - javascript

I'm a huge newb when it comes to javascript/jQuery/Ajax. I'm looking to learn how to add a close button to content on my site similar to facebook's wall or youtube's experimental homepage.
Where is the starting point to do this? jQuery UI? Any other packaged solutions?

You just need to have a list of links to the function that you want to execute and hide them.
Then, when you click on the close button, it makes that list appear.
Here's a simple example
http://www.jsfiddle.net/9scYR/

Related

redirect link from facebook to website - javascript?

I have articles posted on facebook from my website http://juniorgoldreport.com/
the website is made in wordpress, and I've also created a "Welome" landing page where I want most new users to be directed too.
I have no idea where I can find information on how to do this, even after countless efforts of googling.
To give an exact idea of what I' trying to create...
Where someone clicks on an article on facebook, it'll take them to the "welcome" sign up page, then have a link on it to the article that they clicked on. The link would change depending on what article they clicked on so they can be redirected properly.
I know I can just hard code it, and create multiple landing pages with different links in relation to the article posted, but this just seems inefficient.
Does anyone know how to go about doing this?
this is the landing page
http://juniorgoldreport.com/welcome/
You can try using Javascript, as it would be much easier than creating several webpages. At the point in your page where you want a link to be placed, put something like
<p id="mynewredirectlink">Hey!</p>
And then at the bottom of your code, add some javascript to resemble this:
<script type="text/javascript">
if (document.referrer === "facebooklink.com")//Where did you come from?
$("#mynewredirectlink").innerHTML = "Hey!" //Where are you going?
Then include the other sites you need, and close it with
</script>
There may be some sites that have varying parts, like an id, so if you need to, you can use (document.referrer.includes("facebook.com")) instead.
You can convert your landing page into a fullscreen modal popup. So every new visitor will see the popup when the visit the site or any article. They can fill the form / they can close it to see the article. There is already several plugin for modal popup / newsletter popup. You just need to do a little bit css to make it full screen.

How can I add a close button to pop up window

I am in way over my head, new to S/O and need to get this done as soon as possible. If I am doing this wrong I apologize in advance.
I purchased an extension that was simple enough to install but I need to extend the function just a but. I reached out to the developer to no avail.
Anyway I need to add a close button to the pop ups featured on the home page of this website (http://www.juanlafontalaw.com) Click on one of the hotspots (Red) and the pop up will appear. I simply need to add a close button or X that will allow the user to close the pop up without touching the main screen.
The site is Wordpress based. Plug-in: Visual Composer. The Extension: Visual Composer Add-on Image Hotspot with Tooltip (This is the focal point of my question)
I have no idea where to begin and did not expect to be in this position. And I did not think the develop -who does offer support to totally ignore my
Make a button in html, and use jquery click function to make display none in the pop up
$("#btn-id").click(function(){
$("pop-up").css("display","none");
})

Replace photoswipe share icon by something more obvious

I'd like to replace the current share icon on photoswipe by a picture of a Facebook like/share button. How could I do that? Is it difficult? (I don't have any knowledge in JS).
Alternatively is it possible to always display the social share floating box?
Many thanks,
photoswipe uses a single image "sprite"-fashion for it's icons, so you would have to edit the file dist/default-skin/default-skin.png and replace the section of the graphic that is the share icon.
Unfortunately you can't have the social actions menu always visible - it's behaviour is too embedded and would require some serious hacking.
There is currently an open issue around this - https://github.com/dimsemenov/PhotoSwipe/issues/802 - you could add your voice to the issue if it's important to you.

Automatically click an menu button in youtube comments page using javascript

I'm trying to implement a chrome extension to retrieve comments from youtube, a problem is that I want to sort the comments by timeline,one way is to click the "Top Comments" menu and then click the "Newest First" button, I've tried many ways to simulate this operation using javascript(both in content script and chrome console) but failed. Could someone give me some hints? thanks.
Example: see comments of a youtube video here.
If you want to get the comments it's a bad idea to do it using the web interface, instead you should use the API which is less prone to changes.
Useful link:
https://developers.google.com/youtube/2.0/reference#Comments_Feeds
https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters#orderbysp
https://developers.google.com/youtube/articles/changes_to_comments

Pop-up/modal dilemma

I'm stuck in a problem that on first glance seems simple, but actually it's a bit hard to fix. I have a share button on my colorbox and when a user clicks it I want to open a pop-up with the social media link. Now I tried a few simple pop-ups but a lot of the blockers are disabling them and it's not an option to force the users to disable their software.
Can anyone offer suggestions?
You can try to replace your popup with iframe integrated into your page. Place it to the center of the page, hide it initially. And on user click set iframe's src to the url which you open in popup now and show iframe.
Off the top of my head, I'd suggest some sort of modal, jqModal is pretty popular and my preferred way of doing things. Do you have any code that you could share?

Categories

Resources