Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Element find and remove from string/variable using JQuery

I am storing some HTML in a variable. Now I want to remove some div tags from this variable: editor_data:

function validate_step_3()
{
    var editor_data = CKEDITOR.instances.editor1.getData(); 
    var i = $(editor_data);
    alert(i);
}

The alert shows:

[object Object]

I want to remove this div

editor_data.find('#fetch_InCkeditor').remove();
like image 302
Muhammad Shahzad Avatar asked May 16 '13 07:05

Muhammad Shahzad


1 Answers

$(editor_data).find('#fetch_InCkeditor').remove(); will do. :)

like image 132
Suraj Jadhav Avatar answered Nov 14 '22 08:11

Suraj Jadhav