Adding addClass to BODY tag of pages linked push.js

70 views
Skip to first unread message

권기택

unread,
Mar 18, 2015, 1:16:19 AM3/18/15
to gora...@googlegroups.com

I am a user who is using the Ratchet from Korea.

I have a question with the Ratchet. My english is not good, but I hope you to understand what I am saying.

I linked both one.html and two.html through push.js.

http://break.kimsq.co.kr/test/one.html 
http://break.kimsq.co.kr/test/two.html 

What I want is that aplying different style to Header and Content DIV of two.html.

For that I added .myStyle CLASS to BODY tag of two.html and then applyed custom style CSS to two.html below.


<style>
.myStyle .bar-nav {
...
}
.myStyle .content {
.......
}
</style>

<body class="myStyle">

<header class="bar bar-nav">
...
</header>

<div class="content">
...
</div>

By the way, It doesn't work in the middle of 2 pages using push.js. Can I apply the .myStyle CLASS to BODY tag of two.html in the middle of linking push.js with 2 pages.

I guess that I have to use this way below. Please help me.

window.addEventListener('push', myFunction);

Reply all
Reply to author
Forward
0 new messages