WordPress Plugin Polaroid Slider Lite Admin Upload Button Issue – Fixed

Last week i was install this module one of my project. That has issue with Jquery in admin panel upload button. I was get java script error. So i check browser console part. There shows the error on Jquery attirbute select on font.js file.

[javascript]
Error: Syntax error, unrecognized expression: input[name=*font-weight]:checked
[/javascript]

Normally that Jquery attribute select will be like this format.

[sourcecode language=”plain”]
Attribute Contains Prefix Selector [name|="value"]
Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).

Attribute Contains Selector [name*="value"]
Selects elements that have the specified attribute with a value containing the a given substring.

Attribute Contains Word Selector [name~="value"]
Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.

Attribute Ends With Selector [name$="value"]
Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.

Attribute Equals Selector [name="value"]
Selects elements that have the specified attribute with a value exactly equal to a certain value.
Also in: Selectors > jQuery Extensions

Attribute Not Equal Selector [name!="value"]
Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value.

Attribute Starts With Selector [name^="value"]
Selects elements that have the specified attribute with a value beginning exactly with a given string.

Has Attribute Selector [name]
Selects elements that have the specified attribute, with any value.

Multiple Attribute Selector [name="value"][name2="value2"]
Matches elements that match all of the specified attribute filters.
[/sourcecode]

Reference from here Jquery website

So based on the jquery example. i Try to resolve this issue to change that code in fonts.js file on this path “wp-content/plugins/polaroid-slider-lite/settings/types/”

Line no:114

This:
[javascript]
var weightNode = jQuery(‘input[name=*font-weight]:checked’, this.parentNode)[0];
[/javascript]

Replace with:
[javascript]
var weightNode = jQuery(‘input[name*=font-weight]:checked’, this.parentNode)[0];
[/javascript]

Line no: 120

This:
[javascript]
var weightNode = jQuery(‘input[name=*font-weight]:checked’, this.parentNode)[0];
[/javascript]

Replace with:
[javascript]
var weightNode = jQuery(‘input[name*=font-weight]:checked’, this.parentNode)[0];
[/javascript]

Line no: 126

This:
[javascript]
var weightNode = jQuery(‘input[name=*font-weight]:checked’, this.parentNode)[0];
[/javascript]

Replace with:
[javascript]
var weightNode = jQuery(‘input[name*=font-weight]:checked’, this.parentNode)[0];
[/javascript]

After replace that code you upload button will work perfect. Enjoy with code fix.

About the author: ShareSoftAdmin

Leave a Reply

Your email address will not be published.