Accessing HTML DOM elements in background on Ionic2 - javascript

With ionic2, I'm trying to implement a Timer as attached in the link on a sidemenu template. I have this implementation on one of the page how do we run this timer in background when trying to access a different page from the sidemenu. It works well for Ionic1 framework, but in ionic2 because of the navigation stack push & pop architecture the timer pauses when i leave the page and resumes when i enter back. So i'm not sure on how to implement this. Any help is much appreciated.
Thanks
Suresh

Related

How to embed a ppt in a website(React App) without using iframe and with transition animations?

I want to know how i can embeded a ppt (or google slides link in my web App) without using iframe, in my react App.
I have seen this sort of implementation in Scrimba.
https://medium.com/scrimba/whats-new-at-scrimba-e38b9fd5ab7b
Here, User can click Import from Google slides in the top right corner, and will get slide slideshow added.
and they are not using iframe.
Any help or lead will be very helpful.
Thank you.

How do I change a content part of my website by changing the url keeping the menus static and already running?

I really need a good help I am looking for and nothing.
I am doing a project with music in the browser and / or in an application, that is, I need to work with html / php / js / css, if I do it on a website I easily step into an application, I assume, with react for example, with a load window.
that is, I wanted a framework, or anything else that was possible, to have a menu always active, and when clicking on the menus, change the content of the page in the middle, which continues with the menu without being changed, the music playing and changing up url.
such as spotify, it has a menu at the bottom and side that never changes but the middle content changes and the url too
I'm not finding any way to do this well ... if someone managed to help me, I would be very grateful
Reactrouter might be what u are looking for. It is good library for react apps that need to switch between different views depending on URL. They have good documentation on their website and I recommend that you look them up.

is it possible to use retrieving history (or document state) as a navigation in browser?

I'm worrying that I won't get any reply from stack overflow, because I couldn't get any reply from previous question. You don't need to fully read previous question, but It could be helpful to understand my question.
Our company is on service that html document builder(windows application) and I'm a desktop s/w engineer. after build html document with our windows app, we export all things to html/js/css.
Consumer of our application is a designer who creates or edits contents via our windows app. and the end-user of contents which is created by designer see contents via browser(chrome, safari (iphone), samsung browser).
The Problem is, my superior (programmer) wants use java-script as a navigation, this is possible. but, he want to save all state of document state before navigation, so after navigation to any page and then comeback to origin page, all state - animation (contents may have animation) and all script state - should be same exactly before he leaving origin page.
More specifically, main html has a iframe, and iframe can shows all contents. Main.html have a navigation button so iframe can navigate all contents created by designer. If user interacted with page1.html inside iframe, then make iframe to change its content to page2.html by clicking navigation button (go to second page button implemented inside main.html but outside of iframe). and then back to page1.html, he get exactly same state as before he leaving page1.html.
At a glance, It seems quite possible just implement go-forward or go-backward, but dynamically paging navigation is impossible to me. I found some techniques - access browser visit history and window.history object, but It seems there isn't user-defined way.
I thought Electron app(desktop) will be fine for our solution, but my superior says It should be works well with just html/js/css. Our final product should be shown in desktop, iPad, mobile or any device that handle web browser.
I need technical advice to accomplish this issue, I'm fine there is no way to control navigation while saving document state. Help me please.
Document state can be saved by using localstorage object in javascript.

Remove/Hide div From Website

I have a css animation that essentially slides two images with a high z-index off the screen revealing the website content below it on the home page. It is only on the home page and not on any other pages.
What I would like to do is have this animation run only the first time the page is accessed during a session. So if the user navigates to another page and then comes back to the home page, I don’t want the animation to run again.
The only solution I can think of is to create an HTML5 session storage object on the first page load that is checked every time the home page is loaded and use jquery to hide div that contains animation if the value of the object is set.
This seems a bit overkill for such a simple task. Any suggestions on a simpler way of just removing the div that is persistent across page reloads during the session? You don’t have to write the code for me, just point me in a simpler direction if possible. Like is there a way to do this with just CSS. Or if I remove the element using JavaScript will it remain removed after navigating to another page within site and then coming back to home page. Please and thanks!
P.S. This is a custom WordPress theme so I’m open to a PHP solution as well.
You can check the referrer URL and run the animation only if the referrer is not the site itself. But this time the animation won't be shown if the visitor first opens another page and then navigates to the homepage.
Another option would be using cookies.

View video and use website simultaneously in same view with refreshes

So I am creating this interesting project. In this project, a you are guided through a website tour with a YouTube video. To achieve this I need to be able to view the video and work on the website simultaneously so that every page refresh doesn't load the video all over again and the user has his progress maintained.
Is there any jQuery plugin or library I could use? If someone knows anything related to this, please guide me ..
Thanks ..

Categories

Resources