-
Notifications
You must be signed in to change notification settings - Fork 0
/
b-day.js
27 lines (26 loc) · 982 Bytes
/
b-day.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(function() {
// Load the script
var script = document.createElement("SCRIPT");
var link = document.createElement("LINK");
link.href="https://cdn.rawgit.com/jothamhernandez/snippetFiles/master/bday.css";
link.type="text/css";
link.rel="stylesheet";
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
script.type = 'text/javascript';
script.onload = function() {
var $ = window.jQuery;
// Use $ here...
$(document).ready(function(){
$.ajax({
url: "https://cdn.rawgit.com/jothamhernandez/snippetFiles/master/message.json",
method: "GET",
dataType: "JSON",
success: function(data){
var content = $(".my_greeting > p").html(data.message);
}
})
});
};
document.getElementsByTagName("head")[0].appendChild(script);
document.getElementsByTagName("head")[0].appendChild(link);
})();