Skip to content
This repository was archived by the owner on Dec 2, 2019. It is now read-only.

Commit e1ec4b6

Browse files
author
Gerhard Lazu
committed
Got rid of @ selectors for jQuery v1.3
Thanks Steve!
1 parent 5be1699 commit e1ec4b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

glz_custom_fields_raw.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ function glz_custom_fields_replace() {
324324
$(document).ready(function() {
325325
// removes all existing custom fields
326326
$("p:has(label[for*=custom-])").remove();
327-
$("p:has(label[@for=override-form])").after(\''.$out.'\');
327+
$("p:has(label[for=override-form])").after(\''.$out.'\');
328328
329329
// add a reset link to all radio custom fields
330330
$(".glz_custom_radio_field").each(function() {
@@ -1670,15 +1670,15 @@ function glz_custom_fields_css_js($buffer) {
16701670
};
16711671
16721672
// toggle custom field value based on its type
1673-
if ( $("select#type option[@selected]").attr("value") == "text_input" ) {
1673+
if ( $("select#type option[selected]").attr("value") == "text_input" ) {
16741674
custom_field_value_off();
16751675
};
16761676
16771677
$("select#type").click( function() {
1678-
if ( $("select#type option[@selected]").attr("value") != "text_input" && !$("textarea#value").length ) {
1678+
if ( $("select#type option[selected]").attr("value") != "text_input" && !$("textarea#value").length ) {
16791679
custom_field_value_on();
16801680
}
1681-
else if ( $("select#type option[@selected]").attr("value") == "text_input" && !$("input#value").length ) {
1681+
else if ( $("select#type option[selected]").attr("value") == "text_input" && !$("input#value").length ) {
16821682
custom_field_value_off();
16831683
}
16841684
});
@@ -1690,16 +1690,16 @@ function glz_custom_fields_css_js($buffer) {
16901690
// ### RE-USABLE FUNCTIONS ###
16911691
16921692
function custom_field_value_off() {
1693-
$("label[@for=value] em").hide();
1693+
$("label[for=value] em").hide();
16941694
$("textarea#value").remove();
1695-
$("label[@for=value]").after('<input id="value" value="no value allowed" name="value"/>');
1695+
$("label[for=value]").after('<input id="value" value="no value allowed" name="value"/>');
16961696
$("input#value").attr("disabled", "disabled");
16971697
}
16981698
16991699
function custom_field_value_on() {
1700-
$("label[@for=value] em").show();
1700+
$("label[for=value] em").show();
17011701
$("input#value").remove();
1702-
$("label[@for=value]").after('<textarea id="value" name="value"></textarea>');
1702+
$("label[for=value]").after('<textarea id="value" name="value"></textarea>');
17031703
}
17041704
17051705
});

0 commit comments

Comments
 (0)