You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor class into a new file. Stops using half-implemented Singleton pattern.
6
+
* Update documentation.
7
+
* Add GitHub Updater support.
8
+
9
+
## 1.0.1 (2011-06-02)
10
+
11
+
* Improved plugin so script is hooked in with priority 1 - avoids a theme placing anything before the script (props [Josh Stauffer](http://twitter.com/joshstauffer))
Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
4
+
5
+
## Description
6
+
7
+
If you look at the source of a WordPress back-end page, you'll see it has a body class of `no-js`. Immediately after the opening `body` tag is a small script which replaces `no-js` with `js` (you can see the amended class with Firebug / Inspector).
8
+
9
+
WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.
10
+
11
+
This plugin recreates the same effect, but for the front-end of <ahref="http://genesis-theme-framework.com/">Genesis Framework</a> child themes. It uses the `genesis_before` hook supplied by Genesis, so it won't work for other themes.
12
+
13
+
The script is fairly small so does not block rendering of other content for any noticeable length of time.
14
+
15
+
Putting the script at the top also reduces a flash of incorrectly styled content, as the page does not load with `no-js` styles, then switch to `js` once everything has finished loading.
16
+
17
+
## Installation
18
+
19
+
Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.
20
+
21
+
### Upload
22
+
23
+
1. Download the latest tagged archive (choose the "zip" option).
24
+
2. Go to the __Plugins -> Add New__ screen and click the __Upload__ tab.
25
+
3. Upload the zipped archive directly.
26
+
4. Go to the Plugins screen and click __Activate__.
27
+
28
+
### Manual
29
+
30
+
1. Download the latest tagged archive (choose the "zip" option).
31
+
2. Unzip the archive.
32
+
3. Copy the folder to your `/wp-content/plugins/` directory.
33
+
4. Go to the Plugins screen and click __Activate__.
34
+
35
+
Check out the Codex for more information about [installing plugins manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
36
+
37
+
### Git
38
+
39
+
Using git, browse to your `/wp-content/plugins/` directory and clone this repository:
Then go to your Plugins screen and click __Activate__.
44
+
45
+
## Updates
46
+
47
+
This plugin supports the [GitHub Updater](https://github.com/afragen/github-updater) plugin, so if you install that, this plugin becomes automatically updateable direct from GitHub.
* Description: For child themes of the <a href="http://genesis-theme-framework.com/">Genesis Theme</a>. Adds a <code>no-js</code> body class to the front-end, and a script on <code>genesis_before</code> which immediately changes the class to <code>js</code> if JavaScript is enabled. This is how WP does things on the back-end, to allow differing styles for elements if JavaScript is active or not.
* Description: For child themes of the <a href="http://genesis-theme-framework.com/">Genesis Framework</a>. Adds a <code>no-js</code> body class to the front-end, and a script on <code>genesis_before</code> which immediately changes the class to <code>js</code> if JavaScript is enabled. This is how WP does things on the back-end, to allow differing styles for elements if JavaScript is active or not.
Copy file name to clipboardExpand all lines: readme.txt
+5-3
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ Contributors: GaryJ
3
3
Donate link: http://code.garyjones.co.uk/donate/
4
4
Tags: genesis, js-no-js
5
5
Requires at least: 3.0
6
-
Tested up to: 3.3
7
-
Stable tag: 1.0.1
6
+
Tested up to: 4.0
7
+
Stable tag: 2.0.0
8
8
9
9
Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
10
10
@@ -15,13 +15,15 @@ Make front-end styling easier for child themes on the <a href="http://genesis-th
15
15
Adds a `no-js` body class to the front-end, and a script on `genesis_before` which immediately changes the class to `js` if JavaScript is enabled.
16
16
This is how WP does things on the back-end, to allow different styles for the same elements depending if JavaScript is active or not.
17
17
18
-
This plugin is only useful if you're using a child theme of the <a href="http://genesis-theme-framework.com/">Genesis Framework</a> since it needs to use the `genesis_before` hook.
18
+
This plugin is only useful if you're using a child theme of the Genesis Framework since it uses the `genesis_before` hook.
19
19
20
20
== Installation ==
21
21
22
22
1. Unzip and upload `genesis-js-no-js` folder to the `/wp-content/plugins/` directory
23
23
1. Activate the plugin through the 'Plugins' menu in WordPress
24
24
25
+
Once installed and activated, then the plugin will work. There are no options, and nothing to set-up.
0 commit comments