我是这个很棒的论坛的新手,因此不确定下面的问题是否属于这里。
一个小JavaScript,当我在其中放置一个静态url时,它可以完美地工作,但我不知道如何使用get_permalink()
var $el, $tempDiv, $tempButton, divHeight = 0;
$.fn.middleBoxButton = function(text, url) {
return this.hover(function(e) {
$el = $(this).css("border-color", "white");
divHeight = $el.height() + parseInt($el.css("padding-top")) + parseInt($el.css("padding-bottom"));
$tempDiv = $("<div />", {
"class": "overlay rounded"
});
$tempButton = $("<a />", {
"text": text,
"href": url,
"class": "widget-button rounded",
"css": {
"top": (divHeight / 2) - 7 + "px"
}
}).appendTo($tempDiv);
$tempDiv.appendTo($el);
}, function(e) {
$el = $(this).css("border-color", "#999");
$(".overlay").fadeOut("fast", function() {
$(this).remove();
})
});
}
$(function() {
$(".widget-one").middleBoxButton("Read More", "http:// bla bla bla");
});
任何我想得到的帮助。