Last active
October 5, 2023 10:28
-
-
Save georgebyte/9420858 to your computer and use it in GitHub Desktop.
HTML5, jQuery: JSON in data attribute
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
HTML: | |
<a href="#" data-lang-string='{"show":"{{ Lang::get('header.show_menu') }}", "hide":"{{ Lang::get('header.hide_menu') }}"}' id="toggle_navigation">{{ Lang::get('header.show_menu') }}</a> | |
JAVASCRIPT: | |
$("#toggle_navigation").data('lang-string').show; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment