Comments (3)
Hi @florindumitru, yes Fries does not execute any scripts from the loaded page. You must add your scripts to index.html and listen for events there.
from fries.
@jaunesarmiento pls also need to know if fries work on iOS and android 2.2 ?
from fries.
Here's a little something on how to do this, you must catch the push
event that stack.js fires whenever a page gets pushed onto the screen.
So given that you have an inner page like this:
<div id="page2" class="page">
<!-- some content here -->
</div>
You just need to do the following in your index.html
:
<script type="text/javascript">
window.addEventListener('push', function () {
if (document.getElementById('page2')) {
console.log('We are on page 2');
// do what you want here
}
});
</script>
This may not be the best solution but I think this will work for now. @aymanfarhat and I have already had a few discussions on how to hook code when loading a new page. I think this is something that should really be included in Fries.
And no, I actually haven't tested Fries on iOS. And I believe it won't work on Android 2.2 due to its stock browser being outdated.
from fries.
Related Issues (20)
- Material design
- Outdated Documentation Ratchet Link HOT 1
- Deprecated jekyll command line in README.md - Revert 722f50d
- Project websites officially dead!? HOT 5
- swich on/off and radio button not working HOT 7
- Support for Android versions lower than 4.0 HOT 1
- Navigation logic with back button HOT 3
- Display crash losing css + js
- when we will meet navigation drawer HOT 2
- Onclick function won't run on buttons, and anchor tags. HOT 1
- Examples+Site examples do not work. HOT 1
- Keyboard overlap on field (textbox) of form. HOT 4
- Load next page when clicking HOT 2
- broken on android 4.4.2 ? HOT 2
- Checkboxes in lists HOT 1
- Form elements are not working HOT 3
- Fries as a chrome app HOT 1
- Merged theme branches and examples HOT 9
- Sliding between tabs
- Switching between tabs not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fries.