tags:

views:

61

answers:

2

i have code like this

function slideelement(element1)
{
  $("#"+element1).slidein();
}

it is not working

+2  A: 

It is not slidein() but slideDown():

function slideelement(element1)
{
  $("#" + element1).slideDown();
}
Sarfraz
ok slideDown() but main problem is elementid
@user355293: Make sure that the id you are passing to is the one for which an element exists. Also post your html and example call to function.
Sarfraz
+1  A: 

If you are passing in a DOM element, you can just wrap it with a jQuery object like so:

function slideelement(element1)
{
  $(element1).slideDown();
}

If you're passing in an ID string, then the code you have should be working and you're probably passing an incorrect string.

Andy E