digitalnord
Forum Replies Created
Viewing 8 replies - 1 through 8 (of 8 total)
-
Forum: Plugins
In reply to: [Contact Form 7] Javascript trigger events on selectionYes, you can try to change the
$
tojQuery
, or wrap it all in an anonymous function:jQuery(document).ready(function ($) { // Here you can use $ for jQuery });
Forum: Hacks
In reply to: Scrolling an image On Top Of Another On Mouse OverForum: Hacks
In reply to: Scrolling an image On Top Of Another On Mouse OverHey, here is one way to do that:
HTML
<div class="moveimg"> <img src="https://placehold.it/350x150/ff0"> <div class="moveimg-hover"><img src="https://placehold.it/350x150/cf0"></div> </div>
jQuery
jQuery('body').on('mousemove', '.moveimg', function (e) { jQuery(e.currentTarget).find('.moveimg-hover').css('width', e.offsetX); });
CSS
.moveimg { position: relative; display: inline-block; } .moveimg-hover { position: absolute; top: 0; width: 0; height: 100%; overflow: hidden; } .moveimg-hover img { max-width: none; }
Forum: Themes and Templates
In reply to: Change select drop down to checkboxes using JavaScriptThis is one way to do it with jQuery:
jQuery(document).ready(function ($) { var $select = $('#unique_id'); var $list = $('<ul>').insertBefore($select); $select.find('option').each(function () { var val = $(this).val(); if (!val) return; $list.append('<li>' + val + '</li>'); }); });
Forum: Fixing WordPress
In reply to: jQuery Brackets Library in WordPress Page issuesTry to change the anonymous function to wait with execution until the document is ready:
jQuery(document).ready(function ($) { $('#minimal .demo').bracket({ init: minimalData /* data to initialize the bracket with */ }) })
Forum: Plugins
In reply to: [Contact Form 7] Javascript trigger events on selectionYou can do this with jQuery:
$('#the_select_box').change(theFunctionToCall); function theFunctionToCall (e) { // do something }
Forum: Fixing WordPress
In reply to: How can I insert both JS, CSS and HTML into a specific WP-page?Here is a shorter version of the jQuery part:
jQuery(document).ready(function ($) { var $container = $('.harimay_hidden').hide(), $open = $('<a href="#" class="button">L?s mere om Diana ↓</a>').insertBefore($container), $close = $open.clone().html('Luk ↑').appendTo($container); $open.add($close).click(function (e) { e.preventDefault(); $container.slideToggle(1000); $open.fadeToggle(500); }); });
Forum: Plugins
In reply to: [WooCommerce] pending paymentWhich version of woocommerce are you on?
Viewing 8 replies - 1 through 8 (of 8 total)