Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open
Commits
e5950ca4
Commit
e5950ca4
authored
Mar 23, 2013
by
Renfred Harper
Browse files
Changed jQuery classes in typeAhead.js to match new CSS
parent
bf5c9be7
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/typeAhead.js
View file @
e5950ca4
...
@@ -12,7 +12,7 @@ $.ajax({
...
@@ -12,7 +12,7 @@ $.ajax({
var
value
=
$
(
'
#searchBar
'
).
val
();
var
value
=
$
(
'
#searchBar
'
).
val
();
if
(
value
==
0
){
if
(
value
==
0
){
//resets all backgrounds to white if the search bar is empty
//resets all backgrounds to white if the search bar is empty
$
(
'
.open
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.open
ed
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.closed
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.closed
'
).
css
(
'
background-color
'
,
'
white
'
);
}
}
});
});
...
@@ -26,12 +26,12 @@ $.ajax({
...
@@ -26,12 +26,12 @@ $.ajax({
},
},
response
:
function
(
event
,
ui
)
{
response
:
function
(
event
,
ui
)
{
//resets all backgrounds to white if the search bar is edited
//resets all backgrounds to white if the search bar is edited
$
(
'
.open
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.open
ed
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.closed
'
).
css
(
'
background-color
'
,
'
white
'
);
$
(
'
.closed
'
).
css
(
'
background-color
'
,
'
white
'
);
//ui.content array contains all names that are returned from the search
//ui.content array contains all names that are returned from the search
for
(
var
result
in
ui
.
content
){
for
(
var
result
in
ui
.
content
){
//Highlights all search results
//Highlights all search results
$
(
'
.open:contains("
'
+
ui
.
content
[
result
].
value
+
'
")
'
).
css
(
'
background-color
'
,
'
#FDFFBF
'
);
$
(
'
.open
ed
:contains("
'
+
ui
.
content
[
result
].
value
+
'
")
'
).
css
(
'
background-color
'
,
'
#FDFFBF
'
);
$
(
'
.closed:contains("
'
+
ui
.
content
[
result
].
value
+
'
")
'
).
css
(
'
background-color
'
,
'
#FDFFBF
'
);
$
(
'
.closed:contains("
'
+
ui
.
content
[
result
].
value
+
'
")
'
).
css
(
'
background-color
'
,
'
#FDFFBF
'
);
}
}
// To prevent the page width from extending
// To prevent the page width from extending
...
...
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