It's that simple:
$os = getOS($_SERVER['HTTP_USER_AGENT']);
echo $os;
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test jquery</title> | |
</head> | |
<body> | |
<ul class="parentul"> | |
<li class=""><a href="http://www.iamtallmirror.com/">First</a></li> | |
<li class=""><a href="">Second</a></li> | |
<li class=""><a href="">Third</a></li> |
//https://jsfiddle.net/richardcwc/d2gxjdva/ | |
<canvas id="canvas" width="500" height="500"></canvas> | |
<ul class="demoToolList"> | |
<li>Brush color: <button class="brushcolor" type="button" value="black">Black</button><button class="brushcolor" type="button" value="white">White</button><button class="brushcolor" type="button" value="silver">Silver</button> | |
</li> | |
<li>Brush size: <button class="brushsize" type="button" value="small">Small</button><button class="brushsize" type="button" value="normal">Normal</button><button class="brushsize" type="button" value="large">Large</button></li> | |
<li><span style="display: block; margin-bottom: 20px;" class="line-opacity-controls"> | |
<label for="line-opacity-control">Line opacity:</label> | |
<span class="info" id="rangeinfo" style="width: 15px; display: inline-block; text-align: center">50%</span> |
<?php | |
// Tell me the root folder path. | |
// You can also try this one | |
// $HOME = $_SERVER["DOCUMENT_ROOT"]; | |
// Or this | |
// dirname(__FILE__) | |
$HOME = dirname(__FILE__); | |
// Is this a Windows host ? If it is, change this line to $WIN = 1; | |
$WIN = 0; |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
line-height: 1.5; | |
} | |
#output { | |
width: 100%; | |
height: 2em; | |
background: #eee; |
add_action('woocommerce_after_checkout_validation', 'rei_after_checkout_validation'); | |
function rei_after_checkout_validation( $posted ) { | |
// do all your logics here... | |
// adding wc_add_notice with a second parameter of "error" will stop the form... | |
// wc_add_notice( __( "OMG! You're not human!", 'woocommerce' ), 'error' ); | |
if (empty($_POST['captcha'])) { | |
wc_add_notice( __( "Captcha is empty!", 'woocommerce' ), 'error' ); |
/* | |
<div class="qty-num"> | |
<span class='qtyminus' field='addcart_{{ product.id }}'>-</span> | |
<span class="quantitySpan">1</span> | |
<span class='qtyplus' field='addcart_{{ product.id }}'>+</span> | |
</div> | |
<input type="hidden" id="addcart_{{ product.id }}" name="quantity" value="1" class="product-form__input" /> | |
*/ | |
jQuery(document).ready(function() { |
<div id='accordian-panel'> | |
<h3 class="accordian-title">Product Details</h3> | |
<div class='accordian-body'>SOME CONTENT HERE</div> | |
<h3 class="accordian-title">Questions & Answers</h3> | |
<div class='accordian-body'>SOME CONTENT HERE</div> | |
</div> | |
<script type="text/javascript"> | |
//On click any <h3> within the container | |
$('#accordian-panel .accordian-title').click(function(e) { |
<div class="grid__item one-quarter footer-cat-list"><div class="Block CategoryList Panel"> | |
<h4>Categories</h4> | |
<div class="BlockContent"> | |
<ul class="sf-menu sf-horizontal sf-js-enabled"> | |
<li style="display: none;"><a href="#">Shop By Subject</a></li> | |
<li style="display: none;"><a href="#">Shop By Color </a></li> | |
<li style="display: none;"><a href="#">Shop By Design/Shape</a></li> | |
<li><a href="#">Panoramic Wall Art</a> | |
</li> | |
<li><a href="#">Vertical Wall Art</a></li> |
{% comment %} | |
A snippet to include a search bar anywhere in your theme. | |
Note we are using 'input-group' for the layout. Look under Forms > Input Groups for some demos. | |
More information: | |
- http://docs.shopify.com/themes/liquid-variables/search | |
To return only products in results: | |
- http://docs.shopify.com/manual/configuration/store-customization/return-only-product-in-storefront-search-results |