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
| //Parent div | |
| $('.js-tobg').each(function() { | |
| //Hunt down img in parent div and snag its src | |
| var imageUrl = $(this).find('img').attr('src'); | |
| //Now add inline style with backgroud-image to div | |
| $(this).css('background-image', 'url(' + imageUrl + ')'); | |
| //Maybe cover the badboy? |
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
| /*---------------------------------------------- | |
| --Vendor Prefix | |
| ----------------------------------------------- */ | |
| /*---------------------------------------------- | |
| --Transition | |
| ----------------------------------------------- */ | |
| /*---------------------------------------------- | |
| --Translate | |
| ----------------------------------------------- */ | |
| /*---------------------------------------------- |
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
| //Fade in page all sexy like with a css opaicty keyframe | |
| document.getElementsByTagName('html')[0].className+=' fade-in-page' |
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
| $(function(){ | |
| //If the url contains foo | |
| if (window.location.href.indexOf('foo') >= 0) { | |
| //add a class on specified div | |
| $('.myclass').addClass('myaddedclass') ; | |
| } | |
| }); |
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
| $(document).ready(function(){ | |
| $('form').find("input[type=textarea], input[type=password], textarea").each(function(ev) | |
| { | |
| if(!$(this).val()) { | |
| $(this).attr("placeholder", "Here goes your placeholder); | |
| } | |
| }); | |
| }); |
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
| /*---------------------------------------------- | |
| --Remove Prompt after change | |
| ----------------------------------------------- */ | |
| //target all styled selects and their generated unordered list | |
| $('.dk-drops').change(function(){ | |
| //Remove the first select option & it's corresponding generated list item | |
| $(".dk_options_inner li:first-child").remove(); | |
| $(this).find('option:first').remove(); | |
| }); |
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
| <!-- Single Next/Last Post nav | |
| ================================================== --> | |
| <section class="post-nav"> | |
| <div class="row"> | |
| <?php $prevPost = get_previous_post(true); | |
| if($prevPost) { | |
| $args = array( | |
| 'posts_per_page' => 1, | |
| 'include' => $prevPost->ID | |
| ); |
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
| <!-- Single Next/Last Post nav | |
| ================================================== --> | |
| <section class="sect-posts post-nav cf"> | |
| <?php $prevPost = get_previous_post(true); | |
| if($prevPost) { | |
| $args = array( | |
| 'posts_per_page' => 1, | |
| 'include' => $prevPost->ID | |
| ); |
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
| /*-----------------------------------------------*/ | |
| /* Create new Role for: Client | |
| /*-----------------------------------------------*/ | |
| $result = add_role( 'client', __('Client' ), | |
| array( | |
| 'read' => true, // true allows this capability | |
| 'edit_posts' => false, // Allows user to edit their own posts | |
| 'edit_pages' => false, // Allows user to edit pages | |
| 'edit_others_posts' => false, // Allows user to edit others posts not just their own |
OlderNewer