Created
October 29, 2016 02:13
-
-
Save mehdimehdi/842551a98d0fad0590bc89e8634272d3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{% extends "base.html" %} | |
{% block content %} | |
<div> | |
Something special in my about page with a <button id="aboutbutton">about button</button>. | |
Something less special with some <button>other button</button> which is the same as the home.html button. | |
</div> | |
<script> | |
/* handle the about page button */ | |
$("#aboutbutton").click(function(){ | |
/* do something that is specific to about page. */ | |
}); | |
/* handle the special button */ | |
$("#otherbutton").click(function(){ | |
/* do something that should also work accross about.html and home.html */ | |
}); | |
</script> | |
{% endblock %} |
This file contains hidden or 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> | |
<head></head> | |
<body> | |
{% block content %}{% endblock %} | |
</body> | |
</html> |
This file contains hidden or 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
{% extends "base.html" %} | |
{% block content %} | |
<div> | |
Something special in my home page with a <button id="homepagebutton">button</button>. | |
Something less special with some <button id='otherbutton'>other button</button>. | |
</div> | |
<script> | |
/* handle the home page button */ | |
$("#homepagebutton").click(function(){ | |
/* do something that is specific to homepage. */ | |
}); | |
/* handle the special button */ | |
$("#otherbutton").click(function(){ | |
/* do something that should also work accross about.html and home.html */ | |
}); | |
</script> | |
{% endblock %} |
This file contains hidden or 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
{% extends "base.html" %} | |
{% block content %} | |
<div> | |
Some other page that does some very simple stuff. | |
</div> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment