R
R
Rokis2015-12-23 06:47:34
WordPress
Rokis, 2015-12-23 06:47:34

Which function can remove code from specific Wordpress tags?

For example, there is a code

<iframe width="804" height="452" src="https://www.youtube.com" frameborder="0" allowfullscreen></iframe>

I need to automatically remove frameborder="0" from it .
What function can do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
spafix, 2015-12-23
@Rokis

# This is in jquery

// Полностью удалить атрибут у элемента
$("iframe").removeAttr("frameborder");

// Записать пустоту в значение атрибута элемента
$("iframe").Attr("frameborder":"");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question