-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
body { | ||
background: #f4fbff; | ||
font-family: 'Maitree', serif; | ||
} | ||
|
||
#container { | ||
width: 80vw; | ||
margin: 0 auto; | ||
padding: 20px; | ||
background: #FFF; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$( "#ruk" ).ruk({ | ||
only: true | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>jquery.ruk</title> | ||
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" /> | ||
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Maitree:400,700"> | ||
<link type="text/css" rel="stylesheet" href="base.css" /> | ||
<link type="text/css" rel="stylesheet" href="../src/jquery.ruk.css" /> | ||
</head> | ||
|
||
<body> | ||
<div id="container"> | ||
<h2>jquery.ruk</h2> | ||
<div id="ruk"> | ||
<div> | ||
<div>First Title</div> | ||
<div> | ||
Omit optional fields and think of other ways to collect data. Always ask yourself if the question can be inferred, postponed, or completely excluded. | ||
|
||
Data entry is increasingly automated. For example, mobile and wearable devices collect large amounts of data without the user’s conscious awareness. Think of ways you can leverage social, conversational UI, SMS, email, voice, OCR, location, fingerprint, biometric, etc. | ||
</div> | ||
</div> | ||
<div> | ||
<div>Second Title</div> | ||
<div> | ||
Omit optional fields and think of other ways to collect data. Always ask yourself if the question can be inferred, postponed, or completely excluded. | ||
|
||
Data entry is increasingly automated. For example, mobile and wearable devices collect large amounts of data without the user’s conscious awareness. Think of ways you can leverage social, conversational UI, SMS, email, voice, OCR, location, fingerprint, biometric, etc. | ||
</div> | ||
</div> | ||
<div> | ||
<div>Third Title</div> | ||
<div> | ||
Omit optional fields and think of other ways to collect data. Always ask yourself if the question can be inferred, postponed, or completely excluded. | ||
|
||
Data entry is increasingly automated. For example, mobile and wearable devices collect large amounts of data without the user’s conscious awareness. Think of ways you can leverage social, conversational UI, SMS, email, voice, OCR, location, fingerprint, biometric, etc. | ||
</div> | ||
</div> | ||
</div> | ||
<!-- copyright notice.--> | ||
<p>© effone, 2018</p> | ||
</div> | ||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | ||
<script type="text/javascript" src="../src/jquery.ruk.js"></script> | ||
<script type="text/javascript" src="base.js"></script> | ||
</body> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "jquery.ruk", | ||
"version": "1.0.0", | ||
"description": "Yet another full-fledged jQuery accordion plugin with bare minimum code", | ||
"main": "./dist/jquery.ruk.min.js", | ||
"ecosystem": "jquery", | ||
"scripts": { | ||
"test": "jest" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/effone/jquery.ruk.git" | ||
}, | ||
"keywords": [ | ||
"jquery-plugin", | ||
"accordion", | ||
"bare", | ||
"small", | ||
"tiny" | ||
], | ||
"author": "effone", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/effone/jquery.ruk/issues" | ||
}, | ||
"homepage": "https://github.com/effone/jquery.ruk#readme" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.ruk>div>* { | ||
border: 1px solid #EEE; | ||
padding: 10px; | ||
} | ||
|
||
.ruk>div>.rq { | ||
background: #FBFBFB; | ||
font-weight: 700; | ||
margin-top: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
.ruk>div>.ra { | ||
border-top: none; | ||
display: none; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(function ($) { | ||
$.fn.ruk = function (options) { | ||
var settings = $.extend({ | ||
only: true | ||
}, options); | ||
$(this).addClass("ruk").children('div div').children('div:first-child').addClass("rq").next('div').addClass('ra'); | ||
|
||
$('.rq').on('click', function () { | ||
if (settings.only) { | ||
$('.rq').not(this).next('.ra').slideUp('fast'); | ||
} | ||
$(this).next('.ra').slideToggle('fast'); | ||
}) | ||
}; | ||
}(jQuery)); |