Git Product home page Git Product logo

jquery-widowfix's Introduction

Widow Fix

Widow Fix is a jQuery plugin to fix widows, or orphans, or whatever you call them—those single words on their own line. It does this by adding a   (non-breaking space) in between the last 2 words.

Another related script is Widow Tamer by Nathan Ford mentioned on http://artequalswork.com/posts/on-widows.php which is pretty sweet too.

Available in bower as jquery-widowfix

jquery-widowfix's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jquery-widowfix's Issues

en/em dashes causing conflict with security setting

A web host I publish through, using a built-in editor, calls the code invalid and will not save. Support has pointed me to the en and em dashes as the cause. I have updated my file to:
// all 3 dash types: regular, en, em
var dashes = ['\u002D','\u2013','\u2014'];

I'm not sure if this is a problem others experience with any regularity, or if it is a security issue by any means, but these are my 2 cents.

[enhancement] Add missing bower.json.

Hey, maintainer(s) of matthewlein/jQuery-widowFix!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library matthewlein/jQuery-widowFix is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "matthewlein/jQuery-widowFix",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

hyphens

Make it work with a hyphens flag to count or not count hyphens.

might have to switch to a <nobr> method for that.

Widow fix is not a function

Hello,

Great plugin. The only issue I'm having is with Chrome on Windows. I'm getting an uncaught type error widowFix is not a function and it's knocking other scripts out from working on the page.

Can you help?

Many thanks, Stephen

Non-breaking spaces added inside HTML tags

I've been noticing a number of nbsps being added within the opening tags of HTML elements, for example:

<img src="..." &nbsp;alt="..." />

In most browsers, this doesn't break anything, but in IE it tends to break that element and cause (in the case of the img tag) a broken image to show instead. I've also noticed this occurring in form elements—for example, causing a hidden field to be visible.

don't fix hyperlinks et cetera

thank you for a great plugin. I do see one issue that could use improvement: when the last line is a hyperlink, don't add   s to the tag, or any tag, for that matter.

the returned source code looks like this:
<a&nbsp;href="mailto:[email protected]">[email protected]</a>
which then doesn't quite work anymore.

cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.