diff options
author | Pavel Kanyshev <aerohub@users.noreply.github.com> | 2017-04-08 23:09:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-08 23:09:49 +0300 |
commit | 8d63455cdd7778b1d4ed5fc7722f6b4a5d5a69ef (patch) | |
tree | a0858787274db9e41b33fbd729dfa8b0aedbbaba | |
parent | 52446a90569471a9bcc9c421910655ec148d9aef (diff) | |
parent | 3a6ceba0de238b7cda9be632bf3032b6fda67ee1 (diff) |
Merge pull request #6 from gilbsgilbs/hide-link
Don't display button if no link is provided
-rw-r--r-- | layouts/partials/scripts.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index b2c5fa4..19b1fdf 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -306,7 +306,14 @@ this.$title.html( eldata.title ); this.$description.html( eldata.description ); - this.$href.attr( 'href', eldata.href ); + + if (eldata.href) { + this.$href.attr( 'href', eldata.href ); + this.$href.show(); + } + else { + this.$href.hide(); + } var self = this; @@ -427,4 +434,4 @@ $(function() { Grid.init(); }); - </script>
\ No newline at end of file + </script> |