Created
March 11, 2017 01:24
-
-
Save dimaslanjaka/e3a7d1a1176a9f8a439ecdd8695a8b99 to your computer and use it in GitHub Desktop.
jQuery Add Class // source http://jsbin.com/jujiwi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<title>jQuery Add Class</title> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="https://www.w3schools.com/lib/w3.css"> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script src="https://code.jquery.com/jquery-migrate-3.1.0.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.lazy.min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.lazy.plugins.min.js"></script> | |
</head> | |
<body id="#top"> | |
<p>Test</p> | |
<p>test</p> | |
<div> | |
<img src="http://google.me/favicon.ico"> | |
</div> | |
<script id="jsbin-javascript"> | |
$( "img" ).addClass( "w3-card-4 loader lazy" ); | |
$('#top > img:not([alt])').attr('alt', 'AltText'); | |
$('#top > img:not([title])').attr('title', 'TitleText'); | |
$('#top > img:not([longdesc])').attr('longdesc', 'http://pastebin.com/raw/sWdd3D1g'); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<title>jQuery Add Class</title> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="https://www.w3schools.com/lib/w3.css"> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"><\/script> | |
<script src="https://code.jquery.com/jquery-migrate-3.1.0.js"><\/script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.lazy.min.js"><\/script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.lazy.plugins.min.js"><\/script> | |
</head> | |
<body id="#top"> | |
<p>Test</p> | |
<p>test</p> | |
<div> | |
<img src="//google.me/favicon.ico"> | |
</div> | |
</body> | |
<script src="http://yui.yahooapis.com/3.10.0/build/yui/yui.js"><\/script> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">$( "img" ).addClass( "w3-card-4 loader lazy" ); | |
$('#top > img:not([alt])').attr('alt', 'AltText'); | |
$('#top > img:not([title])').attr('title', 'TitleText'); | |
$('#top > img:not([longdesc])').attr('longdesc', 'http://pastebin.com/raw/sWdd3D1g');</script></body> | |
<script src="http://yui.yahooapis.com/3.10.0/build/yui/yui.js"></script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( "img" ).addClass( "w3-card-4 loader lazy" ); | |
$('#top > img:not([alt])').attr('alt', 'AltText'); | |
$('#top > img:not([title])').attr('title', 'TitleText'); | |
$('#top > img:not([longdesc])').attr('longdesc', 'http://pastebin.com/raw/sWdd3D1g'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment