开发者

jQuery jPicker path issues when used in WordPress Theme Options

开发者 https://www.devze.com 2022-12-23 19:33 出处:网络
Anyone with experience using jPicker colorpicker in a WordPress Custom Theme options panel. I believe that the default path for the jPicker resources is /jPicker/ relative to the location the js file

Anyone with experience using jPicker colorpicker in a WordPress Custom Theme options panel. I believe that the default path for the jPicker resources is /jPicker/ relative to the location the js file appears, however, I'm not seeing the picker.gif icon, so I tried changing the path in the js file like so..开发者_C百科.

images:{clientPath:"../wp-content/themes/myTheme/images/"

Everything else appears to be working at first load. My bound input field's background color is the same as the currently selected color. However, the picker.gif icon is missing. Where it should appear, I've just got a 2px wide by 20px tall color element (looks like a div perhaps).


Use absolute path instead of relative. So if your image is under .../wp-content/themes/myTheme/images/myGif.gif location use this: images:{clientPath:"/wp-content/themes/myTheme/images/"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号