[jQuery] Simple Question with Clone() and Append()

2009-08-18 Thread Renato Untalan

I'm trying to clone an element, more specifically a fieldset tag.

Original HTML:
fieldsetHello World./fieldset

Javascript:
$(fieldset).each(function(count,item){
  var fieldsetBlock = $(this).append($(this).clone())
})


Desired HTML:
fieldsetHello World./fieldset
fieldsetHello World./fieldset

Undesired Result:
fieldset
  Hello World.
fieldset
  Hello World.
/fieldset
/fieldset

I hope this is a trivial question.  Thanks in advance jquery friends!
Any help is appreciated.


[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Renato Untalan

Thank you Ed!

On Aug 18, 11:05 am, Ed Allen ed.all...@gmail.com wrote:
 Replace .append() with .after() I think.

 On Aug 18, 10:52 am, Renato Untalan phis...@gmail.com wrote:

  I'm trying to clone an element, more specifically a fieldset tag.

  Original HTML:
  fieldsetHello World./fieldset

  Javascript:
  $(fieldset).each(function(count,item){
    var fieldsetBlock = $(this).append($(this).clone())

  })

  Desired HTML:
  fieldsetHello World./fieldset
  fieldsetHello World./fieldset

  Undesired Result:
  fieldset
    Hello World.
      fieldset
        Hello World.
      /fieldset
  /fieldset

  I hope this is a trivial question.  Thanks in advance jquery friends!
  Any help is appreciated.


[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Renato Untalan

Thank you!

On Aug 18, 11:05 am, Charlie Griefer charlie.grie...@gmail.com
wrote:
 As per the docs (http://docs.jquery.com/Manipulation/append#content),
 append() appends content to the *inside* of every matched element.

 You can try appending to the current matched element's parent, or try the
 after() method (http://docs.jquery.com/Manipulation/after#content)



 On Tue, Aug 18, 2009 at 10:52 AM, Renato Untalan phis...@gmail.com wrote:

  I'm trying to clone an element, more specifically a fieldset tag.

  Original HTML:
  fieldsetHello World./fieldset

  Javascript:
  $(fieldset).each(function(count,item){
   var fieldsetBlock = $(this).append($(this).clone())
  })

  Desired HTML:
  fieldsetHello World./fieldset
  fieldsetHello World./fieldset

  Undesired Result:
  fieldset
   Hello World.
     fieldset
       Hello World.
     /fieldset
  /fieldset

  I hope this is a trivial question.  Thanks in advance jquery friends!
  Any help is appreciated.

 --
 I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.


[jQuery] Re: tablesorter Speed issues

2009-04-21 Thread Renato Untalan

This is good to here.
I just implemented tablesort, at which there will be up to 1000 rows.
Glad to know that 400 sorts very quickly.

On Apr 9, 5:19 pm, csi95 bmomal...@gmail.com wrote:
 Okay, my bad here.

 Thanks to the one-on-one help of one of the great members here, I was able
 to find the problem.

 It wasn't the software, it was the hardware.

 There was something odd going on with the development PC I was using to run
 the test.  Not only was my sort running very slow, so were the tests 
 onhttp://tablesorter.com/docs/example-triggers.htmltablesorter.com .  When I
 switched to another machine, the sorts were damned near sub-second.

 Low-and-behold, I reboot the development machine and now it too sorts
 quickly.

 Stupid.  Stupid.  Stupid.

 Sorry to waste your time.

 - Bryan



 csi95 wrote:

  Hi folks,

  I've just started using tablesorter for one of my projects, and overall I
  love it.  Does just what I need.

  The one issue I've come across is that it's S-L-O-W!  On a small table,
  it's just fine.  Once I get up to about 400 rows, however, it takes a long
  time.  6 seconds before the list appears sorted, and another 10 seconds
  before I actually regain control of the browser (Firefox 3.08 / Win32 in
  this case).

  Is this normal?  Should it really take that long to sort 400 rows of data?

  I could understand if it were 4,000 rows, but 400 doesn't seem like much.
  In fact it would probably be quicker to just do a round-trip to the server
  and let the database do the sorting.

  I'm looking for some practical experience and / or suggestions from anyone
  who may be working with tablesorter on large tables.

  Thanks!

- Bryan

 --
 View this message in 
 context:http://www.nabble.com/tablesorter-Speed-issues-tp22977435s27240p22979...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] JSON , PHP, MySQL, and jQuery

2009-04-09 Thread Renato Untalan

I'm having trouble parsing JSON in Javascript.

The response i'm getting from PHP when making a request is:
[
{'name': 'John', 'lastName': 'Doe','age':'25', 'height': '170',
'weight': '120'},
{'name': 'Jane', 'lastName': 'Doe','age':'26', 'height': '175',
'weight': '121'},
{'name': 'Jack', 'lastName': 'Doe','age':'27', 'height': '180',
'weight': '122'} ]

How would I go about parsing this in Javascript?  Am I not encoding it
correctly on the PHP Side?

Here's my JAVASCRIPT:
$.get(includes/functions_inside.php, {function : getAppList},
function(data, textStatus){
alert( data[0] );
}
);

Here's my PHP:

$AppListQuery = $insideDB-customQuery($query);
$rows = array();
while($r = mysql_fetch_assoc($AppListQuery)) {
$rows[] = $r;
}
print json_encode($rows);

Thanks in advance!