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(){ | |
| $('.btn').popover(); | |
| $('.btn').on('click', function (e) { | |
| $('.btn').not(this).popover('hide'); | |
| }); | |
| }); |
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
| if(window.innerWidth <= 800 && window.innerHeight <= 600) { | |
| return true; | |
| } else { | |
| return false; | |
| } |
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
| <script> | |
| $("#test-popover").on("click", function(){ | |
| var anonymous_nickname = $("#id_nickname").val(); | |
| if (anonymous_nickname.length <= 2) { | |
| $('#id_nickname').popover('show'); | |
| } else { | |
| $('#id_nickname').popover('destroy'); | |
| } |
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
| http://graph.facebook.com/user_id/picture | |
| https://graph.facebook.com/me/friends?access_token=[oauth_token]&fields=name,id,picture |
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() { | |
| var ul = $("<ul>"); | |
| $("table tr").each(function(){ | |
| var li = $("<li>") | |
| $("th, td", this).each(function(){ | |
| var p = $("<p>").html(this.innerHTML); | |
| li.append(p); | |
| }); | |
| ul.append(li); | |
| }) |
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
| UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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
| RENAME table `wp_commentmeta` TO `wp_a123456_commentmeta`; | |
| RENAME table `wp_comments` TO `wp_a123456_comments`; | |
| RENAME table `wp_links` TO `wp_a123456_links`; | |
| RENAME table `wp_options` TO `wp_a123456_options`; | |
| RENAME table `wp_postmeta` TO `wp_a123456_postmeta`; | |
| RENAME table `wp_posts` TO `wp_a123456_posts`; | |
| RENAME table `wp_terms` TO `wp_a123456_terms`; | |
| RENAME table `wp_term_relationships` TO `wp_a123456_term_relationships`; | |
| RENAME table `wp_term_taxonomy` TO `wp_a123456_term_taxonomy`; | |
| RENAME table `wp_usermeta` TO `wp_a123456_usermeta`; |
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
| <textarea id="foo">Some text</textarea> | |
| <script type="text/javascript"> | |
| var textBox = document.getElementById("foo"); | |
| textBox.onfocus = function() { | |
| textBox.select(); | |
| // Work around Chrome's little problem | |
| textBox.onmouseup = function() { | |
| // Prevent further mouseup intervention |
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
| 5 | |
| down vote | |
| Try adding the following to your layout .xml file within <reference name="head"> | |
| <action method="addJs"> | |
| <script>js/custom-script.js</script> | |
| </action> |
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
| http://frontlinedev.com/image-paths-a-magento-how-to/ | |
| Media Images from Template (phtml) Files | |
| Adding an image from the media folder: | |
| <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA). 'subfolder/image.png'; ?>" /> | |
| *note Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) returns a path of www.yourwebsite.com/media | |
| Another way to produce the same link is: | |
| <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK). 'media/subfolder/image.png'; ?>" /> |