开发者

Wordpress plugin using Jquery broken in Webkit browsers after update

After updating to Wordpress 3.2.1 my photo gallery plugin, Photo Galleria, has now broken in Webkit browsers.

Here is an example page with a gallery, which works in IE8 &开发者_开发百科 FF, but not Webkit browsers.

The Javascript console in Chrome states this

Uncaught SyntaxError: Unexpected token ( [galleria.works.js.55]

Uncaught Error: Fatal error: No theme found. [galleria.js:77]

'works' is the name of a custom theme I made for Photo Galleria, which I mainly adapted from other Galleria themes.

It seems the theme attempts to load before the plugin, which is suggested by the "No theme found" error, but seeing it works fine in other browsers, is this the real problem?

I have been going in circles with regard to how Webkit browsers load Jquery and other javascript, and I haven't cracked it yet. My javascript knowledge is basic at best, so any help would be greatly appreciated.

Note: The link above may not work after a while as we are moving hosts soon.


I am going to go ahead and start an answer instead of continuing to comment.

For starters, inside the init function you have a block of code that looks like the following:

counter: function () {
     return c.showing_image.replace(/\%s/, a.getIndex() + 1).replace(/\%s/, a.getDataLength())
}

Try commenting that out and see if you can get it to run. You are trying to insert a property in the middle of the function and that is not legal syntax. Your counter may not show up, but getting it to load up is the first step.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜