[jQuery] Re: IE doesn't seem to see classes created by other JQuery Script

2009-07-14 Thread zorba

No, as far I as can see.

I wrap some lists of words with strong using a little fn:

function setBold(text) {
var occur = text.split(,);
for( i=0; ioccur.length; i++ ){
var TEXT = occur[i].toUpperCase();
$('p').each(function() {
$.highlight(this, TEXT);
});
}
}

which calls jQuery.highlight from Johann Burkard:

$(function () {
jQuery.highlight = document.body.createTextRange ?
function (node, te) {
var r = document.body.createTextRange();
r.moveToElementText(node);
for (var i = 0; r.findText(te); i++) {
r.pasteHTML('strong' + r.text + '\/strong');
r.collapse(false)
}
}: function (node, te) {
var pos, skip, spannode, middlebit, endbit, middleclone;
skip = 0;
if (node.nodeType == 3) {
pos = node.data.toUpperCase().indexOf(te);
if (pos = 0) {
spannode = document.createElement('strong');
spannode.className = 'highlight';
middlebit = node.splitText(pos);
endbit = middlebit.splitText(te.length);
middleclone = middlebit.cloneNode(true);
spannode.appendChild(middleclone);
middlebit.parentNode.replaceChild(spannode,
middlebit);
skip = 1
}
} else if (node.nodeType == 1  node.childNodes  !/(script|
style)/i.test(node.tagName)) {
for (var i = 0; i  node.childNodes.length; ++i) {
i += $.highlight(node.childNodes[i], te)
}
}
return skip
}
});

Then I look for some of these .highlight, and this is when Firefox
find it and IE doesn't.



On Jul 14, 12:57 am, Ricardo ricardob...@gmail.com wrote:
 What is the other script that adds the class, does it involve ajax/get/
 load?



[jQuery] IE doesn't seem to see classes created by other JQuery Script

2009-07-13 Thread zorba

Hi,

I'll do my best to explain the following.
I simply want to do this:

$(myDiv p).find(.highlight:contains(someText)).doSomeStuff...

where the class .highlight has just been appended by another script.
It works great with FF but not with any of the IE navigators.

I verified with the most simple script I could, like $
(.highlight).remove(); and obviously Firefox can detect this class
created by JQuery but IE can't .

Why ? Or where am I wrong ?

Thanks in advance for your replies.



[jQuery] ajaxSubmit and NiceJForms plugins

2008-02-04 Thread zorba

Hello.

The NiceJForms plugin is called like following:

 $.NiceJForms.build();

I build a form dinamically so that I have to call again NiceJForms to
apply it to the new elements.

Here is the problem, if I do:

var options = {
//some stuff
success: function() {
$.NiceJForms.build();
}
};
$('myform').submit(function() {
$(this).ajaxSubmit(options);
return false;
});

then NiceJForms is built twice, so that all elts appear twice.

How could I un-build and then build again NIceJform, or call it only
on the new elts?

Any idea is welcome.Thanks.

--~--~-~--~~~---~--~~
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] ajaxSubmit and NiceJForms plugins

2008-02-04 Thread zorba

Hello.

The NiceJForms plugin is called like following:

 $.NiceJForms.build();

I build a form dinamically so that I have to call again NiceJForms to
apply it to the new elements.

Here is the problem, if I do:

var options = {
//some stuff
success: function() {
$.NiceJForms.build();
}
};
$('myform').submit(function() {
$(this).ajaxSubmit(options);
return false;
});

then NiceJForms is built twice, so that all elts appear twice.

How could I un-build and then build again NIceJform, or call it only
on the new elts?

Any idea is welcome.Thanks.


[jQuery] Re: Ajax tabs detect automatically

2007-10-15 Thread zorba

well,
you're right, the way I use tabs in these pages is not exactly what it
was built for.
I use it as a Client-side pagination. Works nice that way also.

So I got confused when I finally found the reasons of non-working
upgrade, and I apologise that you lost your time because of me.

There were two problems.
First of all I made a mistake :in the UI version, you're supposed to
apply the tabs method to the unordered list and forget the old
#container.

Then I built my page putting the shadetabs (used as pager), after and
not before the .tabcontent.
if you combine these two things you obtain a very amazing and destroy
result.

Anyway, thinking about this misadventure, I decided to use a script I
found in my go-to-bed-book, the great learning jquery of Karl
Swedberg and Jonathan Chaffer, to build both pagination and table
sorting.

Thanks a lot for your help, and for your great contribution to jQuery.



[jQuery] Re: Ajax tabs detect automatically

2007-10-15 Thread zorba

last question,

it seems that  triggerTab() is no more useful.
How can I replace it please?

thanks




[jQuery] Re: Ajax tabs detect automatically

2007-10-12 Thread zorba

could any 'jQueryan' help me to avoid remote tab loading
automatically?

pleeaaz?



[jQuery] Re: Ajax tabs detect automatically

2007-10-10 Thread zorba

The best woud be if you could just have a look at this site I'm
currently developping.

http://maroc.visages-trekking.com/beta/randonnee-ski-rando.php

access with login 'zorba' / password 'kazantzakis'

As you see there is a list of items into tabs, each item linking to a
'product' page wich also contains tabs.
This version uses Tabs 2.7, but I had some trouble with IE7 and Clear
Type fonts, so I decided to upgrade.

The following page now uses UI tabs 3.0, then as soon as the page is
loading, it also loads the html of the first 'product page' linked

http://maroc.visages-trekking.com/beta/randonnee-trekking-voyage-desert.php

I hope you unterstand now why I'd like to disable auto detect or auto
loading,
Maybe this could be an option {remote:disable} ,
or I can change a couple of lines in your great code?

Thank you very much
Thierry
PS I do not guarantee bug or css fixes in IE at the moment ;)






[jQuery] Ajax tabs detect automatically

2007-10-09 Thread zorba

hi, using that wonderful plugin for a while. Thanks  Klaus Hartl !
Now, I've just been updating with version 3.0

My problem is that in older versions, you had to precise { remote:
true } in order to load tab content dynamically via Ajax.

Well now,  tabs() detect automatically any link in the context and
loads its content.

I need to disable that function, because I build the tabs with a php
request, and it's full of links (kind of 'products' page), so it
immediately begins to load undesired remote content.

I've been searching a lot in docs, but it seems that it is not in
option.

Any idea please?

Thanks for your help