I was just wondering how to use the function :not in my situation.
This is jquery. I'm trying to select the elements in the list that are not in the condition mention in the if loop.
Json object received: ["blue", "teleport", "love", "transformers", "blink182", "leap year", "database", "valentines", "bearish", "sting", "a1", "telegraph", "trion", "spa", "property", "jolie", "grace", "santa claus"]
I just want to receive the words without the special characters
function refreshKeywords(e) {
e.preventDefault();
var refresh_form = jQuery(e.target);
alert("HELLO");
$.ajax({
url: refresh_form.attr('action'),
type: refresh_form.attr('method'),
data: refresh_form.serialize(),
dataType: 'json',
success: function(response) {
var list = response.new_list;
if (list != "["
or list != "]"
or list != "{"
or list != "}"
$('#keywords').append("<li>" + list + "</li>");
},
});
}
Would appreciate if anyone know how to input the :not function into my code. Thank you so much.
:not"function" for?