我已经阅读并尝试了其他解决方案来解决我的问题,但似乎都没有.
我有3张图片,每张图片都在他们自己的4列div中.我设置了css过渡,以便当用户的鼠标悬停在图像上时,这些图像从灰度渐变为彩色.我现在需要在悬停时出现一个按钮.我附上了一张图片来说明我的意思.
这里是我的HTML和CSS的中间4列的片段.
--------------------- HTML ---------------------
<div class="small-4 columns">
<img src="/wp-content/themes/adamslaw/assets/img/woman.png">
<a class="button" href="/jane/">View Jane's Profile</a>
</div>
Run Code Online (Sandbox Code Playgroud)
--------------------- CSS ---------------------
.greyish {
background: $smoke !important;
h1 {
margin: rem-calc(100) 0 0;
}
img {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s; …Run Code Online (Sandbox Code Playgroud) 我有一个重力表单,用户可以在其中设置复选框来选择要下载的文件。对于增强的 UX,表单是多页的并使用 AJAX。
使用以下 PHP 函数和 Gravity Forms Hook,我可以遍历选定的复选框并将文件添加到 ZIP 存档中,但目前无法开始下载。
add_filter( 'gform_after_submission_3', 'download_brochures_message', 10, 4 );
function download_brochures_message( $entry ) {
$confirmation = "Your download should begin shortly. \r\n";
$error = "Files not set \r\n";
$file1 = rgar( $entry, '1.1' );
$file2 = rgar( $entry, '1.2' );
$file3 = rgar( $entry, '1.3' );
$file4 = rgar( $entry, '1.4' );
$files = array(
$file1,
$file2,
$file3,
$file4
);
print_r($files);
$zip = new ZipArchive();
$current_time = time();
$file_folder = wp_upload_dir();
$dir …Run Code Online (Sandbox Code Playgroud) 我正在使用 AJAX 在 WooCommerce 存档中加载更多产品。我之前在此页面上曾使用 AJAX 来“加载更多” 。我大部分使用了相同的代码,只是更改了WP_Query参数以满足我的需要。我不明白为什么我的代码不起作用。
JS
/**
* AJAX Load (Lazy Load) events
*/
$('#load-more').click( function(e){
e.preventDefault();
ajax_next_posts()
$('body').addClass('ajaxLoading');
});
var ajaxLock = false; // ajaxLock is just a flag to prevent double clicks and spamming
if( !ajaxLock ) {
function ajax_next_posts() {
ajaxLock = true;
// How many posts there's total
var totalPosts = parseInt( jQuery( '#found-posts' ).text() );
// How many have been loaded
var postOffset = jQuery( 'li.product' ).length
// …Run Code Online (Sandbox Code Playgroud)