Giter VIP home page Giter VIP logo

jquery-ie-text-shadow's Introduction

jquery-ie-text-shadow

ie8
Win XP, IE 8 with jquery-ie-text-shadow
safari6
Mac OS X 10.8, Safari 6

概要 / Overview

使い方 / Usage

  • jQueryをインクルードした後に、このライブラリをインクルードしてください。
    Internet Explorer 以外で不要な処理を実行しないため、 Internet Explorerの条件付きコメントを使うことをおすすめします。
  • 適用したい jQuery オブジェクトに対して、ieTextShadow()メソッドを呼び出してください。
  • CSSのtext-shadowプロパティで指定したスタイルが自動的に適用されます。

  • It is necessary to include this library after jQuery.
    I recommend that you use Internet Explorer's conditional comment.
  • Call ieTextShadow() method of jQuery DOM object that you'd like to apply text-shadow.
  • The style that defined by CSS text-shadow property is applied.
<script src="jquery-1.7.1.min.js"></script>
<!--[if lt IE 10]>
<script src="jquery-ie-text-shadow.js"></script>
<script>
$(document).ready(function() {
    $('.emboss').ieTextShadow();
}
</script>
<![endif]-->
<style>
.emboss {
    text-shadow: 0px -1px #222222, 0px 2px #FFFFFF;    
}
</style>
<div class="emboss">Emboss</div>

Options

  • ieTextShadow()メソッドの引数に、text-shadow プロパティの値を指定すると、CSSのスタイルを上書きできます。

  • You can overwrite CSS text-shadow property by arguments of ieTextShadow() method.
$('.emboss').ieTextShadow('4px -4px 10px red, -4px -4px 10px green');

制限事項 / Known Issues

  • 2行以上にまたがる長いテキストに適用すると、適用部分の後に意図しない改行が入ってしまいます。 面倒ですが、単語ごとに<span>タグで区切ると回避できます。
  • ブラウザのウィンドウサイズの変更等に伴い、テキストがリフローされた場合、影は再レイアウトされません。その結果、ベースのテキストとtext-shadowが分離していまいます。

  • When apply to inline elements with long text running two or more lines, unintended line break are inserted after elements. You may separate a word with a <span> tag to fix it.
  • When you resize window and text are reflowed, shadows are separated from text unintentionally.

謝辞 / Acknowledgement

jquery-ie-text-shadow's People

Contributors

hirayama-evolni avatar rotsuya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jquery-ie-text-shadow's Issues

input hover addClass action

Hi,
I'm trying to add class to p tag when hovering on input[file=submit] button. I am having problem applying classes using jQuery. It works great when I directly apply css classes to tag.

[WORKS]

<p class="confirmBtnGlow text-shadow glow">LOGIN</p>

[PROBLEM]
1)
html

<p class="confrimBtnGlow">LOGIN</p>
<input type="submit" id="loginBtn" class="confirmBtn" value="login" onclick="location.href='userAccConfirm.html'" onFocus="this.blur()" />

script

$(function(){
    $("#loginBtn").hover(function(){
        $(this).addClass('text-shadow glow');
    },function(){
        $(this).removeClass('text-shadow glow');
    });
});

I would appreciate if you can give me any clue to solve this problem.
Thank you in advance.

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.