Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
74f5adae
Commit
74f5adae
authored
Aug 07, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4602 from edx/db/expand-on-click-or-enter
make expanding explanation accessible
parents
e99a14eb
9b99213b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
common/templates/course_modes/choose.html
+22
-5
No files found.
common/templates/course_modes/choose.html
View file @
74f5adae
...
@@ -15,13 +15,27 @@
...
@@ -15,13 +15,27 @@
<
%
block
name=
"js_extra"
>
<
%
block
name=
"js_extra"
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
expandCallback
=
function
(
event
)
{
event
.
preventDefault
();
$
(
this
).
next
(
'.expandable-area'
).
slideToggle
();
var
title
=
$
(
this
).
parent
();
title
.
toggleClass
(
'is-expanded'
);
if
(
title
.
attr
(
"aria-expanded"
)
===
"false"
)
{
title
.
attr
(
"aria-expanded"
,
"true"
);
}
else
{
title
.
attr
(
"aria-expanded"
,
"false"
);
}
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'.expandable-area'
).
slideUp
();
$
(
'.expandable-area'
).
slideUp
();
$
(
'.is-expandable'
).
addClass
(
'is-ready'
);
$
(
'.is-expandable'
).
addClass
(
'is-ready'
);
$
(
'.is-expandable .title-expand'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
$
(
'.is-expandable .title-expand'
).
click
(
expandCallback
);
$
(
this
).
next
(
'.expandable-area'
).
slideToggle
();
$
(
'.is-expandable .title-expand'
).
keypress
(
function
(
e
)
{
$
(
this
).
parent
().
toggleClass
(
'is-expanded'
);
if
(
e
.
which
==
13
)
{
// only activate on pressing enter
expandCallback
.
call
(
this
,
e
);
// make sure that we bind `this` correctly
}
});
});
$
(
'#contribution-other-amt'
).
focus
(
function
()
{
$
(
'#contribution-other-amt'
).
focus
(
function
()
{
...
@@ -103,7 +117,10 @@ $(document).ready(function() {
...
@@ -103,7 +117,10 @@ $(document).ready(function() {
<
%
include
file=
"_contribution.html"
args=
"suggested_prices=suggested_prices, currency=currency, chosen_price=chosen_price, min_price=min_price"
/>
<
%
include
file=
"_contribution.html"
args=
"suggested_prices=suggested_prices, currency=currency, chosen_price=chosen_price, min_price=min_price"
/>
<div
class=
"help-tip is-expandable"
>
<div
class=
"help-tip is-expandable"
>
<h5
class=
"title title-expand"
><i
class=
"icon-caret-down expandable-icon"
></i>
${_("Why do I have to pay? What if I want a free honor code certificate?")}
</h5>
<h5
class=
"title title-expand"
tabindex=
"0"
aria-expanded=
"false"
role=
"link"
>
<i
class=
"icon-caret-down expandable-icon"
></i>
${_("Why do I have to pay? What if I want a free honor code certificate?")}
</h5>
<div
class=
"copy expandable-area"
>
<div
class=
"copy expandable-area"
>
<dl
class=
"list-faq"
>
<dl
class=
"list-faq"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment