Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select id="settingBackground">
- <option name="default">Default</option>
- <option name="thankshaking">Background 2</option>
- </select>
- $(document).ready(function () {
- $('#settingBackground').on('change', function () {
- if (this.value == "Default") {
- // Change background
- $('body').css("background", "#1e8cd4");
- $('body').css("color", "#fff");
- } else if (this.value == "Background 2") {
- // Change background
- $('body').css("background", "url('http://i.imgur.com/cV7PKqh.jpg') no-repeat center center fixed");
- $('body').css("background-size", "cover");
- $('body').css("color", "#000");
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement