Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
osm-leaderboard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sripath Roy Koganti
osm-leaderboard
Commits
04e00db8
Commit
04e00db8
authored
Feb 21, 2018
by
nallamilli veerraghavareddy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
fddcb799
Pipeline
#2900
failed with stages
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
templates/js/index.js
templates/js/index.js
+66
-0
No files found.
templates/js/index.js
0 → 100644
View file @
04e00db8
$
(
function
()
{
'
use strict
'
;
var
CountSelect
=
$
(
'
.countries
'
),
myCountries
=
[
'
Africa
'
,
'
Antarctica
'
,
'
Asia
'
,
'
Europe
'
],
Africa
=
[
'
Algeria
'
,
'
Angola
'
,
'
Benin
'
,
'
Botswana
'
,
'
Burundi
'
],
Antarctica
=
[
'
Amundsen-Scott
'
],
Asia
=
[
'
Bangladesh
'
,
'
Bhutan
'
,
'
Brunei
'
,
'
Cambodia
'
,
'
China
'
,
'
East Timor
'
,
'
India
'
],
Europe
=
[
'
Albania
'
,
'
Andorra
'
,
'
Austria
'
,
'
Belarus
'
,
'
Belgium
'
,
'
Bosnia-Herzegovina
'
,
'
Bulgaria
'
];
// Function Create Option
function
CreateOption
(
valriable
,
elementToAppend
)
{
var
i
;
for
(
i
=
0
;
i
<
valriable
.
length
;
i
+=
1
)
{
$
(
'
<option>
'
,
{
value
:
valriable
[
i
],
text
:
valriable
[
i
],
id
:
valriable
[
i
]})
.
appendTo
(
elementToAppend
);
}
}
// Create Option myCountries
CreateOption
(
myCountries
,
$
(
'
.countries
'
));
// Create Option Africa
CreateOption
(
Africa
,
$
(
'
.Africa
'
));
// Create Option Africa
CreateOption
(
Antarctica
,
$
(
'
.Antarctica
'
));
// Create Option Africa
CreateOption
(
Asia
,
$
(
'
.Asia
'
));
// Create Option Africa
CreateOption
(
Europe
,
$
(
'
.Europe
'
));
// Hide All Select
$
(
'
.option select
'
).
hide
();
// Show First Selected
$
(
'
.Africa
'
).
show
().
css
(
'
display
'
,
'
inline-block
'
);
// Show List Option City Whene user Chosse Countries
CountSelect
.
on
(
'
change
'
,
function
()
{
// get Id option
var
myId
=
$
(
this
).
find
(
'
:selected
'
).
attr
(
'
id
'
);
console
.
log
(
$
(
this
).
val
());
// Show Select Has class = Id And Hide Siblings
$
(
'
.option select
'
).
filter
(
'
.
'
+
myId
).
fadeIn
(
400
).
siblings
(
'
select
'
).
hide
();
});
});
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