[jQuery] remove

2010-02-11 Thread Smith, Allex




[jQuery] Remove element, keep children

2010-01-14 Thread MonkeyGirl
Hi!

Is there a way to remove an element from the DOM, like with remove(),
but to keep its children?  Alternatively, is there a way to move an
element one branch up the tree, so when I remove what used to be its
parent, it'll take its place?

Thank you,
Zoe.


Re: [jQuery] Remove element, keep children

2010-01-14 Thread Gus Waddell
Hi Zoe,

One way to do this is use .appendBefore() to move the children up one level
in the DOM before the element you want to remove  then do the .remove()

--
style type=text/css
#parent { background-color: red; }
/style

a href=javascript:void(0); onClick=removeParent();Remove div
id=parent/a
br /br /
div id=wrapper
This is the wrapper element
div id=parent
 ulliItem 1/liliItem 2/li/ul
/div
 spanAnother Child/span
/div

script type=text/javascript language=javascript
 function removeParent(){
$('#parent').children().insertBefore('#parent');
 $('#parent').remove();

/* or the one line alternative:
 $('#parent').children().insertBefore('#parent').end().end().remove();
*/
 }
/script

Cheers,
Gus


On Thu, Jan 14, 2010 at 10:29 PM, MonkeyGirl z...@monkeehouse.com wrote:

 Hi!

 Is there a way to remove an element from the DOM, like with remove(),
 but to keep its children?  Alternatively, is there a way to move an
 element one branch up the tree, so when I remove what used to be its
 parent, it'll take its place?

 Thank you,
 Zoe.



[jQuery] [ASK] jquery remove

2009-12-15 Thread water [bro] mm
Hi All, I'm new member in this mailing list.
I have problem with jquery,
I have code like this

!DOCTYPE HTML
html lang=enhead
meta http-equiv=content-type content=text/html; charset=UTF-8


titlejQuery UI Droppable - Revert draggable position/title
link type=text/css href=revert_files/ui.css rel=stylesheet
script type=text/javascript
src=revert_files/jquery-1.3.2.js/script
script type=text/javascript src=revert_files/ui.js/script
script type=text/javascript
src=revert_files/ui.draggable-1.7.2.js/script
script type=text/javascript
src=revert_files/ui.droppable-1.7.2.js/script
link type=text/css href=revert_files/demos.css rel=stylesheet
style type=text/css
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em;
float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left;
margin: 10px; }
/style
script type=text/javascript
$(function() {

$(#draggable).draggable({helper: 'clone'});
$(#draggable2).draggable({helper: 'clone'});

$(#droppable).droppable({
accept: #draggable, #draggable2,
activeClass: 'droppable-active',
hoverClass: 'droppable-hover',
drop: function(event, ui) {

var lid = ($(ui.draggable).children(p));
alert(lid);
var removeLink = document.createElement(a);
removeLink.innerHTML = remove;
removeLink.href = #;
removeLink.onclick = function()
{
$(#droppable).children('p').remove(#+lid[0].id);
$(this).remove();
}


$(this).append($(ui.draggable).clone().children(p).addClass(blocker));
$(this).append(removeLink);
}
});

});
/script

/headbody style=cursor: auto;
div class=demo

div id=draggable class=ui-widget-content
pI revert when I'm dropped/p
/div

div id=draggable2 class=ui-widget-content
pI revert when I'm dropped/p
/div

div id=droppable class=ui-widget-header
pDrop me here/p
/div

/div!-- End demo --

div class=demo-description

pReturn the draggable (or it's helper) to its original location when
dragging stops with the boolean coderevert/code option set on the
draggable./p

/div!-- End demo-description --
/body/html


and if click remove, jquery just remove a link remove not tag p
please help me.

-- 
Regards,
Muhammad Imam
Blog : http://waterbomm.web.id/blog
Y!M : imam26_it


Re: [jQuery] [ASK] jquery remove

2009-12-15 Thread brian
On Mon, Dec 14, 2009 at 11:08 PM, water [bro] mm waterb...@gmail.com wrote:

 and if click remove, jquery just remove a link remove not tag p
 please help me.


That is because the this inside your click handler function refers
to the link (because the handler is onclick for the link) even though,
outside of that, it refers to #droppable.

Try changing this:

removeLink.onclick = function()
{
$(#droppable).children('p').remove(#+lid[0].id);
$(this).remove();
}

... to this:

removeLink.onclick = function()
{
$(#+lid[0].id).remove();
}

If the IDs are unique this should work fine, as jQuery will find the P
directly instead of finding it through #droppable.


Re: [jQuery] [ASK] jquery remove

2009-12-15 Thread water [bro] mm
good point,
thanks

2009/12/16 brian zijn.digi...@gmail.com

 On Mon, Dec 14, 2009 at 11:08 PM, water [bro] mm waterb...@gmail.com
 wrote:
 
  and if click remove, jquery just remove a link remove not tag p
  please help me.
 

 That is because the this inside your click handler function refers
 to the link (because the handler is onclick for the link) even though,
 outside of that, it refers to #droppable.

 Try changing this:

 removeLink.onclick = function()
 {
$(#droppable).children('p').remove(#+lid[0].id);
$(this).remove();
 }

 ... to this:

 removeLink.onclick = function()
 {
$(#+lid[0].id).remove();
 }

 If the IDs are unique this should work fine, as jQuery will find the P
 directly instead of finding it through #droppable.




-- 
Regards,
Muhammad Imam
Blog : http://waterbomm.web.id/blog
Y!M : imam26_it


[jQuery] Remove css attribute from the DOM element

2009-12-06 Thread Joshua Partogi
Hi all,

What is the cleanest approach to remove a css attribute from the DOM element?

Currently I have a DOM element which has css background color as such:
td style=background-color: #000

This is currently what I do:
$('td').css('background-color','').append(replacement);

But I'm not sure that is the good approach. Or is it?


Kind regards,

-- 
http://jobs.scrum8.com | http://twitter.com/scrum8


[jQuery] Remove a tab that contains some element

2009-11-13 Thread cPetru
Hello

I created some tabs dinamically and now I need to remove one,
triggered by an element inside a tab (not tab-header, not the
currently selected tab).
I can not find a way to determine the index of the tab that contains a
particular element (let's say table#Streets).

Thank you very much.


Re: [jQuery] Remove a tab that contains some element

2009-11-13 Thread Michel Belleville
Bits of code would definetly help to put you on the right tracks. Can you
show a little html plz ?
Michel Belleville


2009/11/13 cPetru cpe...@gmail.com

 Hello

 I created some tabs dinamically and now I need to remove one,
 triggered by an element inside a tab (not tab-header, not the
 currently selected tab).
 I can not find a way to determine the index of the tab that contains a
 particular element (let's say table#Streets).

 Thank you very much.



[jQuery] Remove Error Message

2009-11-07 Thread Dave Maharaj :: WidePixels.com
Well i finally got the remote validation working. But if there is an error
in a form then i correct it the error message still shows. How can I remove
the message once the error is fixed? I am testing a email address in a db
with 2 emails so i know if its unique or not.
 
rules: {

   data[Profile][email]:{required: true,email:true, remote: {url:
/manage/profile/validate,type: post, data: {fieldname: 'email'}}}
 },
 messages: {
  
   'data[Profile][email]': {
   required: '* This is from JS required',
   email: '* This is from JS email',
   remote: '* This is from JS remote'} }

Thanks
 
Dave



[jQuery] Remove content of div if on /login.php?action=logout page

2009-10-09 Thread Painstik

Can it be done?

If user comes to this page: mypage.com/login.php?action=logout
To remove this div conent: div id=LoginContainer style=


Please help...


[jQuery] remove accordion item

2009-09-30 Thread Hundredth Monkey

hi,
i want to realize a delete button or link within an accordion item. is
it possible to remove a special item or make the header disabled after
a link click within the accordion item content?
so far i' ve tried $(this).parent().fadeOut('slow');
but this kills all item contents :O(
best regards.


[jQuery] remove anything thats not number

2009-09-28 Thread runrunforest

Hi,

I have a value that include word letter and some sign such as $.

I want to remove all of them just keep the number.

For example: i want $99,99 USD become 99  or 100

can someone please give the function


[jQuery] Remove subscrition

2009-09-13 Thread Info - Easyeos
Please remove subscription of i...@easyeos.it 



[jQuery] Remove from selection

2009-09-11 Thread eskimoblood

Ho can I remove an specific element from a jquery selection. I have a
selection of dd and dt of an definition list.Now I remove a specific
one, using remove(), but in the selection the element is still there.
I've read the manual so I know its a feature but how to remove the
element without querying the dl again?


[jQuery] remove() and empy() not work for xml

2009-09-05 Thread g...@iec

Hi All,

I got stuck in a situation.

I have to remove a node from XML using jquery but remove() and empty()
is not working.

var xmlData = {xml document};
$(xmlData).find({node}).each(function(){
 $(this).remove(); or $(this).parent().empty();
})

This work fine for firefox but not work in ie.

Can anybody provide me with some workaround so that i'll be able to
remove node from XML.

Thanks to all for their suggestions in advance.


[jQuery] Remove specific options from a select

2009-08-21 Thread Todd Chambery

Hi all,

I'm having a devil of a time removing options from a select.  Here's
the scenario:

I have one select that when an item is chosen, that item will be
removed from all the other selects containing the same data:

select onchange=update_feat_sub_selection(chardata, 75, 0)
id=feat_75_multi_0
option value=0 id=feat_75_multi_0_option_0Axe, Orc
double/
option
option value=1 id=feat_75_multi_0_option_1
selected='true'Axe,
throwing/option
option value=2 id=feat_75_multi_0_option_2Battleaxe/
option
...
/select
select onchange=update_feat_sub_selection(chardata, 75, 1)
id=feat_75_multi_1
option value=0 id=feat_75_multi_1_option_0Axe, Orc
double/
option
option value=1 id=feat_75_multi_1_option_1Axe,
throwing/
option
option value=2 id=feat_75_multi_1_option_2Battleaxe/
option
...
/select

So in this case I want Axe, throwing removed from the second
select.  Because there can be multiple select instances, I have to
iter over each of them and remove all the selected items any time any
one of them changes.  My (non-working) idea was to:

  1) create a new select containing all items,
  2) replace the current select, and
  3) use the texotela (http://www.texotela.co.uk/code/jquery/select/)
plugin to remove the options that match values stored in an array:

function update_feat_sub_selection(chardata, feat_id, multi_idx) {
var weapon_id = $('select#feat_' + feat_id + '_multi_' +
multi_idx).val();
var row = chardata.feats.first( {
feat_id : feat_id
});

row.weapons[multi_idx] = weapon_id;
chardata.feats.update(row, {
feat_id : feat_id
});

sav(chardata);

// remove the changed weapon from the lists of all other
weapons
$(select[id^='feat_ + feat_id + _multi_']).each(function
(x,
select) {
// skip this one (obviously
if ($(this).attr('id') != 'feat_' + feat_id +
'_multi_' + multi_idx)
{
 feat = feats.first({
 id: feat_id
 });
 rebuilt_select =
create_multi_feat_weapon_selector(feat, x);
 // replace the old select with the new one
with the full suite of
weapons
 $('tr#feat_' + feat_id + '_multi_' +
x).replaceWith
(rebuilt_select);
 $(this).attr('value', selected_weapon_id);
// remove already selected weapons from the
new listing
 char_feat = chardata.feats.first({
 feat_id: feat_id
 });
 $('select#feat_' + feat_id + '_multi_' +
x).removeOption
(char_feat.weapons);
}
});

}

My tr is getting replaced correctly, but no options are removed.

I've been round the horn on this one, I'll take any suggestions.

Thanks,

Todd


[jQuery] Remove rows from tables according to some rules.

2009-08-19 Thread henrikaagaardsoren...@gmail.com

I have a table like this:
table
  tr class=item_collection_begin
td colspan=3/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item_collection_end
td colspan=3/td
  /tr
  tr class=item_collection_begin
td colspan=3/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item_collection_end
td colspan=3/td
  /tr
  tr class=item_collection_begin
td colspan=3/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
  tr class=item
td class=title/td
td class=amount/td
td class=price/td
  /tr
/table

To sum it up I have a rows that acts a header for a collection of item
(class=item_collection_begin).

Is there some way to click on a button and then all the items and
their header (item_collection_begin), and their footer
(item_collection_end, this is not mandatory that they have such one)
are all hidden if there is no item in the collection where the cell
(amount) is bigger than zero?

I have got it to work for all the rows with items:
$('#test .amount').filter(function (index) {
return $(this).html() == 0;
}).parent().remove();

But this does not hide item_collection_begin (and perhabs
item_collection_end).


[jQuery] Remove help

2009-08-06 Thread Dave Maharaj :: WidePixels.com
I have append to add a loading div. But once loaded i want to fade it out
and remove it.
 
I have:
script type= text/javascript/*![CDATA[*/
$(document).ready(function(){
 $('#content').append('div id=load/div');
 $('#load').fadeIn('normal');
 $('#content').load('/?php echo $url ; ?/profile/');
 $('#load').fadeOut('normal' , function() { $('#load').remove(); });
 
});
/script
 
But it does not remove the #load div...so looking at firebug the load div
gets added everytime a user clicks a link
 
div id=load style=display: none;/
div id=load/
div id=load/
div id=load/
div id=load/
 
How can I remove the div once it done loading?
 
Dave 


[jQuery] Remove an element but not it's content

2009-08-06 Thread paulswansea

I'm trying to remove a link, but keep the content within, is there a
simple way to do this in jquery?

div***a href=divThis is a test/div/a/div

turns into

div***divThis is a test/div/div


[jQuery] remove and opera 9.6.4

2009-07-09 Thread Liam Potter


Having a strange bug in opera 9.6.4.

When removing objects from the dom, opera leaves a ghost image of the 
removed object, till you scroll away.
.hide() works fine, so tried hiding before removing, but the ghost is 
still there, tried running the remove in the hide callback, no luck, 
tried hiding with .css and still no luck.


Has anyone come across this bug and found a workaround?

- Liam


[jQuery] Remove margin in last li in Unordered List

2009-07-08 Thread expresso

If I have the following:

div class=jcarousel-clip jcarousel-clip-horizontal style=width:
459px; height: 220px;
ul id=mycarousel class=jcarousel-list jcarousel-list-
horizontal style=height: 220px; width: 918px; left: 0px;
li class=jcarousel-item jcarousel-item-horizontal jcarousel-
item-1 jcarousel-item-1-horizontal jcarouselindex=1
/li
li class=jcarousel-item jcarousel-item-horizontal jcarousel-
item-2 jcarousel-item-2-horizontal jcarouselindex=2
/li
li class=jcarousel-item jcarousel-item-horizontal jcarousel-
item-3 jcarousel-item-3-horizontal jcarouselindex=3
/li
/ul
/div

Trying to figure out how I can do a .each on each li and then add an
additional style to the last li in the list.


[jQuery] Remove an li

2009-07-05 Thread expresso

I want to remove the following li and any after that which have the
class jcarousel-item-placeholder in them

li class=jcarousel-item jcarousel-item-horizontal jcarousel-item-4
jcarousel-item-4-horizontal jcarousel-item-placeholder jcarousel-item-
placeholder-horizontal jcarouselindex=4/

I'm not sure how to go about this.


[jQuery] REMOVE

2009-06-24 Thread Todd Loomis



[jQuery] remove one element in an array

2009-06-12 Thread fabrice.regnier

Hi all,

When i click once on a button, i create one picture on the fly. And so
on. It works ok.

Then, using livequery, when i click on one of the all created
pictures, i would like to see it removed. But it appears that only the
first pic is removed (since all have the same name).

What is my mistake ?

regards,

f.

JQUERY

$(#IdButton).click( function() {
  var pic=pimg id=\IdPicture\ name=\IdPicture[]\ src=\../
images/icone_ko_small.png\//p
  $(this).before(pic);
});

$(#IdPicture).livequery('click', function(event) {
$(this).remove();
});

HTML

input type=submit id=IdButton class=button


[jQuery] remove question

2009-06-11 Thread David .Wu

Can I remove div1 but div2 keep there?

div id=1
div id=2/div
/div


[jQuery] remove() method IE 7 ERROR

2009-05-18 Thread snakebit

Hi,

I have an ajax request which is returning an xml, but when I tray to
remove an element from the xml response I'm receiving the following
error message:

This is happening only in IE7 (I didn't tray in IE6)
Line: 1283
EROOR: Object doesn't support this property or method

This is my code:
var pDialog = $(data_responce).find('PDialog');
if(pDialog ){
pDialog .remove();
}

This is what I find in 1283 when i debugged it :
// Compute a unique ID for the element
if ( !id )
id = elem[ expando ] = ++uuid;

// Only generate the data cache if we're
// trying to access or manipulate it
if ( name  !jQuery.cache[ id ] )
jQuery.cache[ id ] = {};



[jQuery] remove DIV from form (maybe bug)

2009-05-13 Thread vmoravek

Hi all,
I found same strange behavior when I trying hiding, or removing DIVs
inside form.

Please look on my sample here: http://62.245.92.202/jquery-sample.php

Expected behavior is:

When I make change inside input field “one” text “lorem ipsum” will be
shown between “one” and input:text field. When another change is made
“lorem ipsum” text will be remove and shown again. So every time there
will be only one text “lorem ipsum”

This scenario works great only in field “one” when try to fill another
fields  “two” or “three” “lorem ipsum” text will not hide and will be
shown again and again bellow last one.

Please, could you check my script and tell me what I doing wrong?

Thank you
Vojtech

Whole script from sample for copy/paste:

head


script src=http://jquery.com/src/jquery-latest.js; type=text/
javascript/script
script type=text/javascript
$(document).ready(function(){
$(#cust_registration input:text).change(function() {

  var input_name= $(this).attr(name);

  $(.lab_+input_name+ #test).hide();

   $(label[for=+input_name+]).after(p 
id=\test\strong
lorem ipsum /strong/p);

});
});
/script
/head


body

div class=customer_login_form
form id=cust_registration method= action=

div class=lab_one
label id= class=form_desc 
for=oneone/label
/div

div
input id=one class=inputbox type=text 
name=one
/div

div class=lab_two
label id= class=form_desc 
for=twotwo/label
/div

div
input id=two class=inputbox type=text 
name=two
/div

div class=lab_three
label id= class=form_desc 
for=threethree/label
/div

div
input id=three class=inputbox type=text 
name=three
/div


/form
/div
/body


[jQuery] remove all center tags hidden

2009-04-01 Thread tij_dev

Hello everybody,

I'm trying to remove all the center tags which have a visibility
hidden. I tried :

$(cent...@style*=hidden],pDocument).remove();

(pDocument is the node I'm working on) but this doesn't work.

Any idea?

Thanks a lot :)


[jQuery] remove classes when select option is not selected

2009-03-19 Thread jjsanders

Hello,

When i select something from a selectbox it adds a class to the
selected option this way:

$('div#tabs input[type=text], select option:selected, input:checked,
textarea').addClass('takethis');

But  when i select a different option it doesn't remove the class
'takethis' from the option which I first selected.
How can I force this?

Thanks in advance.


[jQuery] remove classes when select option is not selected

2009-03-19 Thread jjsanders

Hello,

When i select something from a selectbox it adds a class to the
selected option this way:

$('div#tabs input[type=text], select option:selected, input:checked,
textarea').addClass('takethis');

But  when i select a different option it doesn't remove the class
'takethis' from the option which I first selected.
How can I force this?

Thanks in advance.


[jQuery] remove radio buttom

2009-03-16 Thread Chris Hall

I'm trying to remove radio buttons under a specific circumstance, but
I'm not having much luck.

Here are the appropriate snippets:

alert(testing);  // just to ensure we are here
$(div.gloves_wear).empty();

...

table border=0
trtd align=centerbGloves Worn/b/td/tr
trtddiv class=wear_gloves

input type=radio name=gloves value=0  /None (no bonus)br /
input type=radio name=gloves value=20 checked /Big Bear
gloves (+1 Strength)br /
/div/td/tr
/table



I get the alert, but it doesn't appear that the empty ever occurs.  I
get no errors in the javascript console, so I'm sure I'm just
referencing it incorrectly or something.

Any help is appreciated.






[jQuery] Remove doenst work on dynamically created li

2009-02-27 Thread Dimby

Hi,

I'm new, so to all of you HELLO Smile.
Btw, im Dutch so maybe my English isnt that good.
I love Jquery but i've got some starting problems.

Live demo:
http://pauldulong.nl/jquery/dgm.php#

When I click on the X the tab disappears, perfect, as it should be.
But when I create a new tab and try to remove that one it doesn't do
anything.

What im I doing wrong?

Dimby - Paul du long


[jQuery] remove live events from all children

2009-02-20 Thread Pappy

I am trying to remove live events from all children of an element
(specifically, the element is a dialog window).

jQuery(#id *).die()

There's an Invalid Quantifier exception when creating the namespace
RegExp in the remove function (line 2431, jquery.js v1.3.1).  The
asterisk is never escaped and is causing the exception.

That said, looking through the code, it looks like '*' is simply not
supported.  True?  If so, am I missing something else easy?  I really
like to not go through each event and remove it (yes, I'm lazy) :)

Worst case, I'll add a class (eg. 'dialog_event') to each element.


[jQuery] Jquery remove dd problem

2009-01-30 Thread NicholasPufal


Hi,

I'm currently using the plugin jQueryForm.

With it I want to retrieve some info from the Ajax request. In order to do
that, each time the user submit the form, I need to clean the information
retrieved previously.

In my XHTML code I have some div in charge of those messages, which is this:

div id=ok style=display:none;
h1Sucesso!/h1   
dl id=list_sucesso
dtAs seguintes operações foram realizadas:/dt
/dl
/div

In the JS part, I did set this:

$(document).ready(function() {

$(#form).ajaxForm(function(data){

$(#list_sucesso dt dd).remove();
$(#ok).fadeIn();  
$(#list_sucesso dt).after(dd+ data + /dd);


});

}); 

The problem is that the line $(#list_sucesso dt dd).remove(); isn't
removing the dd tags. I tried to use empty() as well, and still didn't work.
Tried with html(), and didn't happen as expected. It's always just adding
a DD tag after the one that was created on the previously submission.

Any ideas?

I appreciate any advice.

Nicholas
-- 
View this message in context: 
http://www.nabble.com/Jquery-remove-dd-problem-tp21747270s27240p21747270.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Jquery remove dd problem

2009-01-30 Thread amuhlou

It looks like $(#list_sucesso dt dd).remove();  is the problem.  The
way you've written the selector, it would look inside the dt for the
dd to remove.

$(#list_successo dl dd).remove(); should get the one you're after.





[jQuery] Re: Jquery remove dd problem

2009-01-30 Thread NicholasPufal


Yes. That was the problem.

After I did post it here, I did realize the dumb mistake I've done :ninja:

Thanks a lot for the reply!



amuhlou wrote:
 
 
 It looks like $(#list_sucesso dt dd).remove();  is the problem.  The
 way you've written the selector, it would look inside the dt for the
 dd to remove.
 
 $(#list_successo dl dd).remove(); should get the one you're after.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Jquery-remove-dd-problem-tp21747270s27240p21749870.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] remove()

2009-01-24 Thread Charlie22

I have question how easy remove content from DIV, e.g.
div id='test'test text/div

I thought that code
$('#test').remove()
managed it, but it doesnt true. Thx in advance.


[jQuery] remove ID

2008-12-22 Thread Mike Dodge
Is it possible to remove an ID from an element with Jquery or javascript for
that matter?  I've searched and all I can find is how to remove the whole
element, I just want to remove the ID.Thanks
Mike


[jQuery] Remove ellipsis from shortened title.

2008-11-28 Thread DemersDesigns

Hello,
I am using Simplepie and truncating fields that are longer than a
certain length. This process adds an ellipsis to the end, which I want
in most situations. However, for titles, I do not want the ellipsis to
show. I am trying to use jquery to remove the ellipsis character code
(hellip;) from any H3 tag that has it, but am having a real problem
getting it done. Here is what I have been working from with no luck.

script type=text/javascript
$(function(){
$(dt hellip;).remove();
});
/script


Thanks as always!
-Paul


[jQuery] remove objects from set

2008-11-26 Thread takeshin

Hi!

Using hints from this group, I create set of invalid fields this way:

jQuery.fn.push = function( selector_or_nodes ) {
  //  Given a selector or a jQuery 
object, append all of the
nodes to
  // the current jQuery object.
  var nodes = (typeof a == 'string') ?
  $( selector_or_nodes ) : 
selector_or_nodes;
  var node_count = nodes.length;
  for( var i = 0; i  node_count; i++ ) 
{
  this[ this.length++ ] = 
nodes[ i ]
  };

  };

$.extend({
   validation: {
   invalidFields: $([]),


   addInvalidField: 
function(field) {
   
this.invalidFields.pushIf($(field));
   }
}
});

// code here...
$.addInvalidField($('#myid1'));
// more code here...
$.addInvalidField($('#myid2'));

How to remove object from $.validation.invalidFields?

I'm trying to do it like this:

jQuery.fn.removeIf = function(selector_or_nodes) {
  //  Given a selector or a jQuery 
object, removes all of the
nodes from
  // the current jQuery object.
  var nodes = (typeof a == 'string') ?
  $(selector_or_nodes) : 
selector_or_nodes;
  for (var i = 0; ithis.length; i++) {
  for (var j=0; 
jnodes.length;j++) {
  if 
(this[i]==nodes[j]) {
  // REMOVE 
THIS ELEMENT HERE
  }
  }
  }
  };

I managed to determine if object exist in that set,
but how to remove it?

--
regards,
takeshin


[jQuery] remove objects from set

2008-11-26 Thread takeshin

Hi,

I add elements to set this way:

jQuery.fn.pushIf = function(selector_or_nodes) {
  var nodes = (typeof a == 'string') ?
  $(selector_or_nodes) : 
selector_or_nodes;
  var node_count = nodes.length;
  for(var i = 0; i  node_count; i++) {
  var exists = false;
  for (var j = 0; j  
this.length; j++) {
  if (this[j] == nodes[ 
i ]) {
  exists = true;
  break;
  }
  }
  if (!exists) {
  this[ this.length++ ] 
= nodes[ i ]
  };
  }

 $.extend({
   validation: {
   invalidFields: $([]),


   addInvalidField: 
function(field) {
//Add fields here
   
this.invalidFields.pushIf($(field));
   }
});

  };



I want to have function removing from invalidFields, like that:

jQuery.fn.remove = function( selector_or_nodes ) {

  var nodes = (typeof a == 'string') ?
  $( selector_or_nodes ) : 
selector_or_nodes;
  var node_count = nodes.length;
  for( var i = 0; i  node_count; i++ ) 
{
  for (var j = 0; j  
this.length; j++) {
  if (this[j] == nodes[ 
i ]) {
 
alert('fffound!');
  // delete 
this item here
// I would use splice if this was an array, but this is jQuery object
 break;
 }
  }
  }
  };

How to delete item if fffound?

--
regards,
takeshin


[jQuery] remove doesn't prevent a request for the image

2008-11-25 Thread Webbes

Hi there,

It is my goal to defer loading of images in the cycle plugin. Which I
have accomplished as follows. But please have a look at the 4th line:
$(
function() {
var imgStack = [];
$('.slideshow  img:gt(2)').remove().each(function()
{ imgStack.push($(this).attr(src)) }).removeAttr(src);
$('.slideshow').cycle({
fx: 'fade',
before: function(curr, next, opts) {
if (opts.addSlide) {
if (opts.imgs.length) {
var slide = new Image();
slide.src = opts.imgs.pop();
opts.addSlide(slide);
}
}
},
imgs: imgStack.reverse()
});
}
);

this will remove all images after the 3th one from the DOM and loads
them one be one only when nececary. As you can see I had to add the
'removeAttr(src)' in line 4.

If I omit this last part the images will be requested from the server
even though I have removed the elements from the DOM. Is this the
correct behavior because it seems a bit silly to me to request images
that are not in the dom anymore. Or am I missing something and using
it completly the wrong way.

I would rather use the makeArray method en cut my jQuery after the
remove() but it gives me the same issue. Allthough the items are not
supposed to be in the DOM the images are still being downloaded...

Thanks,

Wes


[jQuery] Remove comma

2008-11-22 Thread shapper

Hello,

I have the following code:

$levels = $('input[name=Levels]:checked + label');
levels = $levels.map(function() { return $(this).text(); }).get();
$theme.append(levels.join(, )).append('br /');

How can I replace the last comma in levels by  and ?

I tried:
levels.join(, ).replace(/, $/,'and ')

This is not working.

Could someone, please, help me?

Thanks,
Miguel


[jQuery] Remove CSS setting (not class)?

2008-11-11 Thread Shawn Grover


I have an odd situation where a DIV can be displayed in one of 3 states:
- normal (X x Y pixels in dimension),
- minimized (hidden)
- maximized - the height value removed so that the div grows/shrinks to 
show the contents of the div.


The first two are done, but I'm hitting a wall on the maximized bit.  
Perhaps because it's WAY past bed time for me.


I've tried $(#myElement).css(height, ); with no luck.  I don't 
want to just say 100%, because some content may only be a line or two, 
while others may be XXX pages...


Thanks for any tips.

Shawn


[jQuery] Remove() xml nodes doesnt work in ie

2008-11-03 Thread ngjgf

Using remove() on a xml document wont work in ie 7. (works fine in ff)

Example:

$(this.xmlDoc).find(gd  cd).remove();

Results in js error: Object doesnt support this property or method
which points to line 666 in jquery, id = elem[ expando ] = ++uuid;

Anyone know a work around/way to fix for this?


[jQuery] Remove() xml nodes doesnt work in ie

2008-11-03 Thread ngjgf

Using remove() on a xml document wont work in ie 7. (works fine in ff)

Example:

$(this.xmlDoc).find(gd  cd).remove();

Results in js error: Object doesnt support this property or method
which points to line 666 in jquery, id = elem[ expando ] = ++uuid;

Anyone know a work around/way to fix for this?


[jQuery] Remove() xml nodes doesnt work in ie

2008-11-03 Thread ngjgf

Using remove() on a xml document wont work in ie 7. (works fine in ff)

Example:

$(this.xmlDoc).find(gd  cd).remove();

Results in js error: Object doesnt support this property or method
which points to line 666 in jquery, id = elem[ expando ] = ++uuid;

Anyone know a work around/way to fix for this?


[jQuery] Remove() xml nodes doesnt work in ie

2008-11-03 Thread ngjgf

Using remove() on a xml document wont work in ie 7. (works fine in ff)

Example:

$(this.xmlDoc).find(gd  cd).remove();

Results in js error: Object doesnt support this property or method
which points to line 666 in jquery, id = elem[ expando ] = ++uuid;

Anyone know a work around/way to fix for this?


[jQuery] Remove JS if statement from other script

2008-10-17 Thread hubbs

How possible is it to remove ONLY part of a script, specifically an if
statement from another script?  We have a script that is in the header
of our document, and it screws up a few of our pages, so I don't want
to delete it, since it is needed for some pages, but for specific
pages, I would like it to not execute the if statement.

Is this possible?


[jQuery] Remove div after animation

2008-10-10 Thread XeroXer

Hi!

I am really new to jquery and javascript in general.
I am making an effort in creating something in the area of a smooth
thickbox effect with image magnification.
If people click a link the linked image is opened in an absolute
positioned div that appears with an animate effect.
When they close it I want it to animate back the div into nothing and
then remove it.
I have then tried using .remove() with no success, well it removes the
div but before the animate is done.

Code:
$(#closeThis).click(function () {
   $(#showThis).animate({width: 0, height: 0}, slow);
   $(#showThis).remove();
   return false;
});

I have also tried:
$(#closeThis).click(function () {
   $(#showThis).animate({width: 0, height: 0}, slow).remove();
   return false;
});

Both with the same result, the div is removed directly at click and
not after animate.
Hope that someone can help me fix this problem.
Or maybe it would be better to always have the div on the page but
just not visible, not that I know if that would solve my problem but
maybe it is easier.

Right now:
$(body).append(div id='showThis'pa href='#'
id='closeThis'[close]/a/ppimg src='+theLink+' alt='+theTitle
+'/p/div);

That is what I use when someone clicks a link, maybe a hidden param in
css would work just as well.

Well if anyone has any ideas or tips please respond and help me :D


[jQuery] Remove comment script

2008-09-23 Thread johhnnyboy

Hello,

Im looking for a jquery script that allowes removing comments (which
are placed in divs) for the site with an animation and then removes it
also from my database.

Something similar to hyves comments system.


[jQuery] remove xml nodes

2008-08-26 Thread jjh

I have this issue in IE7 where I do an ajax call that returns a XML
dataset. I would like to remove certain XML nodes before displaying it
into the page. The remove() function works in Firefox but now in IE7.

Example:
$(award[id='3'],xmldata).remove(); //works in FF but not IE

Can someone help me with this?


[jQuery] remove() apparently occurring out of order

2008-08-21 Thread Kit La Touche
First, apologies; I'm a newb to javascript, and have just joined the list.

My problem is this: I have defined a function which allows one to edit the
fields of a form, as in change the number, names and labels of the text
inputs.  It brings up a div using blockUI, and when you click OK, it takes
the nice new labels you've given it, and repopulates the form with them.
The problem is, it only does this sometimes; sometimes it removes all inputs
and labels from the form.

The relevant code is something like this:

$(obj).children('.levels').children('input, br, label').remove();
$('#new-levels-form').children('input').each(function(i){
var name = $(this).val();
if (name) {
$(obj).children('.levels').append(
'label for='+name
+''+name
+': /labelinput class=health-level type=text maxlength=1
name='+name
+' size=1 readonly /'
);
}
});


obj is the specific form on the page that I want to update, .levels is a div
within it that contains the labels and inputs.if there's any more
information I can provide, I'd be happy to.

So, in summary, sometimes the old inputs and labels are removed, then the
new ones added, sometimes they're removed, and nothing's added -- or,
perhaps, they new ones are added, and then they're all removed.  I don't
know quite how to tell.

Thanks,

--Kit


[jQuery] Remove an element ONLY if exists

2008-08-18 Thread Gewton Jhames
There's a way to remove a element by his id, but first check if it exists?

thanks.


[jQuery] remove dynamically placed dom element

2008-07-13 Thread Tom Shafer

I am using this code to add a new item to a list

$(#addLinks).submit(function()
{

$.post(addLinks.php,{ step:'addLink',title:$
('#title').val(),url:$('#url').val(),pageID:$('#pageID').val()} ,
function(data)
{
$('#'+$('#pageID').val()).
append(li id='link_'+data+a href='javascript://'
id='delete' onclick='deleteitem(+data+); return false;'img
src='img/delete.gif' //ah1+$('#title').val()+/h1p+$
('#url').val()+/p/li);
$('#link_'+data).effect(pulsate, { times: 3 }, 1000);

});
   return false;
});

as you can see i am adding a href='javascript://' id='delete'
onclick='deleteitem(+data+); return false;'img src='img/
delete.gif' //a
to delete the newest dom element.

this works on page refresh but I would like it to work right after
someone added the dom element

here is what i am using to delete data from the database and the
element that goes along with the delete item

function deleteitem(id) {
$(function() {
$.post(addLinks.php,{ step:'deleteLink',linkId:+id});
$('#link_'+id).remove();

 });
}

$('#link_'+id).remove();  removes the item after a page refresh. How
can it the element be removed without a page refresh after being added

thanks

-tom


[jQuery] Remove a plugin from elements

2008-06-04 Thread SiCo

Hi, I'm using the Table Hover and Table Drag and Drop plugin, I want
to enable the Table Hover when an element is clicked. Easy enough: $
(#table).tableDnD(); placed inside the onlcik event of the element I
want to activate the plugin.

I also want to unbind the table hover plugin while the drag and drop
plugin is active.

But how do I remove this plugin once the order has been saved? I read
on here that plugins should provide methods to remove them but I don't
believe this one does.

There must be an easy way to do this I just can't find it!

Thanks
Simon


[jQuery] Remove text from a div

2008-05-31 Thread caroig

I have a div containing text and an unordered list. I was to clear the
text from the div without affecting the ul.
$('#mydiv').text() returns just the text string, while $
('#mydiv').text('') successfully clears the text but also removes the
html.

How  can I remove just the text?

Thanks


[jQuery] remove() works differently in 1.5b4, at least for UI Dialogs

2008-05-08 Thread snobo

I stumbled upon a tricky situation. In my app, I use UI Dialogs based
on my form's. When a dialog is created, it takes the form out of
the HTML context where it was originally located, moves before the
closing /body tag and wraps it with all these dialog divs, buttons
etc. But when my AJAX calls replace body content with a new HTML, the
problem occurs that now I have TWO identical forms in the DOM: one
that was just returned with AJAX call, and another one that remains in
this ghost dialog stuck in the end of the body. This makes a mess
and also leads to creating duplicated dialogs...

So, before creating a dialog, I previously had to check for existence
of those ghost dialogs:

if ($('.ui-dialog '+pid).length) $('.ui-dialog '+pid).parents('.ui-
dialog').remove();

where pid is the id of my form that the dialog is made of.

Now, after upgrading to 1.5b4, it turned out that remove() works
differently! It doesn't remove the $('.ui-dialog '+pid).parents('.ui-
dialog'), which is a main dialog div, from DOM! Instead, it kinda
destroys the dialog, stripping all its divs and buttons, and leaving
my original form hanging in the air, still stuck in the end of the
body...

Maybe it's because UI Dialogs have their own remove() method and it
replaces general jQuery remove-from-DOM method?


[jQuery] REMOVE

2008-01-18 Thread Sam Newnam
REMOVE



[jQuery] jquery remove() not removing

2008-01-08 Thread justinteractive

Hi folks,

I'm using remove() to remove a list, then re-creating a list using the
same id. Remove does not appear to be actually removing the instance.

If I check for the element, it returns true, but if I try to work with
it nothing happens? Firebug shows no evidence of the list either.

Anyone experienced similar?


[jQuery] Re: jquery remove() not removing

2008-01-08 Thread Cesar Iduarte
Still having the problem ?

On Jan 8, 2008 9:58 AM, David McFarland [EMAIL PROTECTED] wrote:



 On Jan 8, 2008, at 7:07 AM, justinteractive wrote:

 
  Hi folks,
 
  I'm using remove() to remove a list, then re-creating a list using the
  same id. Remove does not appear to be actually removing the instance.
 
  If I check for the element, it returns true, but if I try to work with
  it nothing happens? Firebug shows no evidence of the list either.

 can you show us your JavaScript code?

 --dave




-- 
Innovation the most beautiful Imagination's result


[jQuery] Re: jquery remove() not removing

2008-01-08 Thread McLars

Remove() does not delete elements. It only removes them from the DOM.
I don't know where they go, but they do hang around somewhere. It's
rather annoying, IMO. I have heard this may change in the next
release, so removed elements are actually deleted.

Does anyone know if this is true?

Larry


On Jan 8, 8:07 am, justinteractive [EMAIL PROTECTED]
wrote:
 Hi folks,

 I'm using remove() to remove a list, then re-creating a list using the
 same id. Remove does not appear to be actually removing the instance.

 If I check for the element, it returns true, but if I try to work with
 it nothing happens? Firebug shows no evidence of the list either.

 Anyone experienced similar?


[jQuery] Re: jquery remove() not removing

2008-01-08 Thread Walter E. Zegarra Sánchez
You can remove anything using:
 $(p).*remove*();

p is the tag you can remove from form.

Exam.

$(tr).remove();

it works, so if you want, you can put this into a for command

atte.
Walter E. Zegarra.



2008/1/8, McLars [EMAIL PROTECTED]:


 Remove() does not delete elements. It only removes them from the DOM.
 I don't know where they go, but they do hang around somewhere. It's
 rather annoying, IMO. I have heard this may change in the next
 release, so removed elements are actually deleted.

 Does anyone know if this is true?

 Larry


 On Jan 8, 8:07am, justinteractive [EMAIL PROTECTED]
 wrote:
  Hi folks,
 
  I'm using remove() to remove a list, then re-creating a list using the
  same id. Remove does not appear to be actually removing the instance.
 
  If I check for the element, it returns true, but if I try to work with
  it nothing happens? Firebug shows no evidence of the list either.
 
  Anyone experienced similar?




-- 
Don´t Worry Be Walter  Alexita!!!


[jQuery] Remove class from an element x, by clicking on y or z?

2007-12-07 Thread El Magnifico

Hi,

Although I figured out the part to add/remove class to an element:

$(li.x).click(function(){
var $this = $(this);
if( $this.is('.xshown') ) {
$this.removeClass('xshown');
$this.addClass('xhidden');
}
else {
$this.removeClass('xhidden');
$this.addClass('xshown');
}
return false;
});

...now I just need to know how I can remove the class from say x click
on y or z instead of having to click again on x to remove the class?

Many Thanks.


[jQuery] remove tr

2007-11-22 Thread rayfidelity

Hi,

I have a cloned row(s) and a function to remove selected cloned row

function remove_row(){
$('a.remove').click(function(){
$(this).parents(tr).remove();
});
}

the problem is that i have to click twice on the link before anything
happens (deletes row) and i don't know why...it works after that...so
to delete first row i have to click twice on the link to remove the
second row i can click only once...it doesn't matter which row i try
to remove...

the link is:

tr
td.../td

tda href=javascript:remove_row(); class=removedelete row/a/
td
/tr


[jQuery] remove() deletes events in jQuery 1.2.1. Why?

2007-11-06 Thread Felix Geisendörfer

Hey,

I recently upgraded my app from jQuery 1.3.1 to 1.2.1 and the transition 
was incredibly easy.


However, yesterday I noticed that $().remove() now seems to behave 
differently then it did in 1.3.1. Thats because now it deletes any 
events attached to the element removed. This happens to be a problem in 
my app b/c I remove unneeded elements from the DOM instead of hiding 
them and inject them back in later on. So when they are injected again, 
they suddenly don't work anymore : ).


Now I looked through the manual and it says this is going to be the 
expected behavior in 1.2.2:


http://docs.jquery.com/Manipulation/remove

Which confuses me b/c it already seems to be the case in 1.2.1 and I'm 
also wondering how I could remove DOM elements without deleting their 
events in future? I'm also curious about why this change is being made, 
is it some anti-memory leak thingy?


Thanks a lot,
-- Felix
--
Blogger: http://www.thinkingphp.org/
Entrepreneur: http://www.posttask.com/ /-- currently in private beta, 
ask me for invite / password/

Freelancer: http://www.fg-webdesign.de/

AIM:theundefined87
Skype:  TimeFor23
Other IM:   felixge.de http://felixge.de/
Mobile (USA):   +1 404 3888693
Mobile (GER):   +49 162 9391612
Twitter:http://twitter.com/felixge



[jQuery] Remove plugin from an element?

2007-09-10 Thread Mika Tuupola


Is there a way to remove a plugin from an element? Lets say I have  
plugin called foo. I attach it to all inputs.


$(input).foo()

Later I need a way to detach foo() from some input elements. One way  
would be to have conditionals inside foo code. However I would prefer  
detaching plugin for good.


--
Mika Tuupola
http://www.appelsiini.net/





[jQuery] remove jScrollPane

2007-09-10 Thread Estevão Lucas

Hi,

I've used the jScrollPane Plugin in my Intefaces, and i have a
problem.
Every time that I resize my window, i also resize my main div, to stay
with the same page's size, but when a resize the div that  contains
the jScrollPane method, it doesn't fix the height.

What I would like to do is when I resize, I would remove the
jScrollPane and attribute again the jScrollPane method.
Can somebody help me?.



[jQuery] remove a single css-property?

2007-09-05 Thread [EMAIL PROTECTED]

is there any solution to remove a single css-property?
i've the problem, that .show() leaves filter: ; in the inline-style
(MSIE).
now i want to remove only this property, but only this and not e.g.
the whole inline-style (.removeAttr('style')).
is there a plugin or a core feature, which can help me?

greetings
Patric


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Remove Column from a table

2007-07-12 Thread Mario Moura

Hi Folks

I need remove first a last column from a table.

To head I used

$('#myid table thead tr  th:first').remove()
$('#myid table thead tr  th:last').remove()

Works fine but to body I am trying without sucess.

I tried this but how you can see will delete only first and last cell.

$('#myid table tbody tr  td:first').remove()
$('#myid table tbody tr  td:last').remove()

Ideas?

Regards

--
Mário Moura


[jQuery] Remove DOM siblings after current item

2007-06-05 Thread [EMAIL PROTECTED]

I have the following DOM:

ul
liblah 1/li
li id=appendExtraAppointmentsblah 2/li
liblah 3/li
liblah 4/li
/ul

I would like to remove the li elements after the li
id=appendExtraAppointmentsblah 2/li.

I tried doing something like this, but it didn't work:

$('#appendExtraAppointments').siblings().not($('li').prev).remove();

Any ideas?

Thanks!



[jQuery] remove() callback

2007-05-14 Thread Equand

is there any way to make a remove function with callback? so after
removing an element a callback function starts?



[jQuery] remove attribute disabled from select - IE6

2007-05-09 Thread Josh Nathanson


Hey all,

It seems as though in IE6, doing $(select).removeAttr(disabled) has no 
effect, i.e. it doesn't re-enable the select menu.  My code works fine in 
FF.  Is this known behavior and is there a workaround, or am I missing 
something?


I started out trying to set disabled=false, which worked in FF, but I 
thought I remembered that didn't work in IE.  That's when I went to 
removeAttr, but I'm finding that doesn't work either.


In the code below, cb is a jQuery object/checkbox, and #sbs_menu is a 
select element.


var disbl = function(cb) {
 if(cb.attr(checked)) {
  $(#sbs_menu).removeAttr(disabled);
 }
 else {
  $(#sbs_menu).attr(disabled,true);
 }
}

-- Josh