[jQuery] [treeview] toggling a node from js

2008-09-16 Thread pihentagy

Hi!

I'd like to expand some branches in a treeview. (It is basically a
collapsed tree, with some brances opened).
Can I do that from javascript? If I simply toggle the visibility, then
the expander icon will be screwed up.

thanks
Gergo


[jQuery] cluetip + only title

2008-03-27 Thread pihentagy

Hi all!

I have an annoying but easy problem with cluetip:

I have:
a title=do not click me class=tooltiplink/a

$('.tooltip').cluetip({splitTitle: '|', showTitle: false});

I want almost the same, but without any title. Is that possible?

My workaround was to write:
a title=|do not click me class=tooltiplink/a

and use showTitle:false in the options, but it seems a bit hackish...

thanks
Gergo


[jQuery] Re: assign to outerhtml

2008-03-04 Thread pihentagy

Thanks for the answer.

After the second search in the docs, I've realized the replaceWith
function

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

So outerHTML setter's jquery equivalent is replaceWith

$.ajax({
  url:'blabla'
  success: function(result) {
$('theid').replaceWith(result)
  }
})

I'm not sure how about the id paranoia you used Jeffrey. Have you
sucked with it, or is it just defensiveness?


On Mar 3, 10:59 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I had to do something similar, and this is how I solved it.

 $.ajax({url:'blabla',success:process});

 function process(results)
 {
 var id = 'therowid';
 var origRow = $('#'+id);
 var newRow = $(results).insertAfter(origRow);
 origRow.remove();
 newRow.attr('id',id);

 }

 So long as results was a string of properly formed TR html, this would
 insert a new row after the current one, then remove the current one.

 Of course, this would only work if you don't have a bunch events wired up
 the row or its children.

 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of pihentagy
 Sent: Monday, March 03, 2008 1:41 PM
 To: jQuery (English)
 Subject: [jQuery] assign to outerhtml

 Hi all!

 I'd like to update a tr tag of a table with an ajax call.
 The problem is that outerhtml is an IE specific attribute, and I have
 the row style defined in the tr tag.
 Is there a cross-browser solution to update a single row of a table
 either with some cross-browser outerhtml script or without using
 outerhtml?
 So here just getting the outerhtml is not enough, I'd like to use it
 as an lvalue.

 Since I'm a beginner in jquery, can I have a minimal but complete
 example? (I have some difficulties with the ajax functions)

 thanks
 Gergo


[jQuery] assign to outerhtml

2008-03-03 Thread pihentagy

Hi all!

I'd like to update a tr tag of a table with an ajax call.
The problem is that outerhtml is an IE specific attribute, and I have
the row style defined in the tr tag.
Is there a cross-browser solution to update a single row of a table
either with some cross-browser outerhtml script or without using
outerhtml?
So here just getting the outerhtml is not enough, I'd like to use it
as an lvalue.

Since I'm a beginner in jquery, can I have a minimal but complete
example? (I have some difficulties with the ajax functions)

thanks
Gergo


[jQuery] form input helper

2008-02-21 Thread pihentagy

Hi all!

I'm trying to achieve the following effect:

When you focus on an input tag, the content of the div  named 'help-
for-xxx' should appear in the #help-tip element.
And, accorgingly when you leave an input it should disappear.
Appearing and disappearing means here fadeIn and fadeOut.
Of course my solution is bad (fadeIn should wait fadeOut to complete).
I know I can attach a callback after event completion, but I don't
know how to build a solution from it.

thanks

Script follows:
$('.help').each(function() {
var that = $(this)
var id = this.id.replace(/help-for-/, '#')
$(id).focus(function(){
$('#help-tip').html(that.html()).fadeIn()
})
$(id).blur(function() {
$('#help-tip').fadeOut()
})
})