Can anybody share any idea on how to implement this. I have a variable with comma separated div names. After an AJAX request i have to hide all the divs parsed from the string. So how do i parse the string to get individual div name and hide it ??
Thanks in advance
jQuery code
var dragExternal = 'div1a,div1b,div2a,div2b';
$.ajax({
type: 'POST',
url: "index.html",
data: dragExternal,
processData: false,
success: function(data) {
alert("Success");
//Start of code to hide all the div's parsed from the string
$('#div1a').slideUp(90);
},
error: function(data) {
alert("Cannot Reach Server");
}
});
HTML Code
<div id="div1a">Item 1</div>
<div id="div1b">Item 2</div>
<div id="div2a">Item 3</div>
<div id="div2b">Item 4</div>
<div id="div3a">Item 5</div>
<div id="div3b">Item 6</div>