最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to change only one javascript function in wordpress child theme?

programmeradmin0浏览0评论

I would like to change just one JavaScript function in the child theme but without having to insert all the JavaScript code of the parent theme.

How do I change only this function (I need change only count = Math.ceil(width / size) line):

function slickAutoResponsive(slider, max, size) {

  if (!max){
    max = 5;
  }
  if (!size){
    size = 380;
  }

  var width = slider.width(),
    count = Math.ceil(width / size);

  if (count < 1) count = 1;
  if (count > max) count = max;

  return count;
}
发布评论

评论列表(0)

  1. 暂无评论