이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Genesis JS / No JS

설명

Make front end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.

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.
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.

This plugin is only useful if you’re using a child theme of the Genesis Framework since it uses the genesis_before hook.

설치

Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.

Upload

  1. Download the latest tagged archive (choose the “zip” option).
  2. Go to the Plugins -> Add New screen and click the Upload tab.
  3. Upload the zipped archive directly.
  4. Go to the Plugins screen and click Activate.

Manual

  1. Download the latest tagged archive (choose the “zip” option).
  2. Unzip the archive.
  3. Copy the folder to your /wp-content/plugins/ directory.
  4. Go to the Plugins screen and click Activate.

Check out the Codex for more information about installing plugins manually.

Git

Using git, browse to your /wp-content/plugins/ directory and clone this repository:

git clone git@github.com:GaryJones/genesis-js-no-js.git

Then go to your Plugins screen and click Activate.

Composer

composer require gamajo/genesis-js-no-js

FAQ

Installation Instructions

Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.

Upload

  1. Download the latest tagged archive (choose the “zip” option).
  2. Go to the Plugins -> Add New screen and click the Upload tab.
  3. Upload the zipped archive directly.
  4. Go to the Plugins screen and click Activate.

Manual

  1. Download the latest tagged archive (choose the “zip” option).
  2. Unzip the archive.
  3. Copy the folder to your /wp-content/plugins/ directory.
  4. Go to the Plugins screen and click Activate.

Check out the Codex for more information about installing plugins manually.

Git

Using git, browse to your /wp-content/plugins/ directory and clone this repository:

git clone git@github.com:GaryJones/genesis-js-no-js.git

Then go to your Plugins screen and click Activate.

Composer

composer require gamajo/genesis-js-no-js
What does this plugin actually do?

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 browser developer tools).

WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.

This plugin recreates the same effect, but for the front end of Genesis Framework child themes.

Shouldn’t the script be at the end of the page?

Usually, yes, but it’s a fairly small script, so does not block rendering of other content for any noticeable length of time.

Doing it immediately 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.

후기

2017년 1월 31일 1 reply
Very useful little script for JavaScript feature detection.
모든 2 평가 읽기

기여자 & 개발자

“Genesis JS / No JS”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Genesis JS / No JS”(이)가 1(으)로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Genesis JS / No JS”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

See CHANGELOG.md for all of the changes.