I am trying and I am almost there

$($('.slideshowCaption').parent('a')).removeAttr("href")
$(".slideshowCaption").wrap($("a").contains($(".slideshowCaption
").text()).clone().empty());

is fine but two things hapen:
1) unlimited <a> empty tags (How can I remove <a> without remove all
children elements?)
2) I need a function

$(document).ready(function(){
$result = $(".slideshowCaption ").text();
if ($(".slideshowCaption ").text() != $result) {
$($('.slideshowCaption').parent('a')).removeAttr("href")
$(".slideshowCaption").wrap($("a").contains($(".slideshowCaption
").text()).clone().empty());
};
});

Please who can help me rewrite this function to JQuery?

Regards

Mario


2007/5/9, Mario Moura <[EMAIL PROTECTED]>:

Hi Folks

Everbody probably know SlideShow from
http://interface.eyecon.ro/demos/slideshow.html

It is nice but dont have a way to href the caption to something.

I am trying but change function dont do what I hope, so probably I am in
wrong way.

$($(".slideshowCaption
").text()).change($(".slideshowCaption").wrap($("a").contains($(".slideshowCaption
").text()).clone().empty()));

basically
$(".slideshowCaption ").text() find the text from slideshowCaption

I hope when this text change (by interface) I can insert in
.slideshowCaption a wrap element (a) that contains  ($(".slideshowCaption
").text()).clone().empty())

I am using .clone ()because I cant lose the text reference and .empty()
because .wrap () need empty element (work fine if I insert into firebug
console)

I tested $(".slideshowCaption").attr("onchange", "alert('Hello');");

So when .slideshowCaption change should alert hello. But again nothing
happen.

What is missing? tips?

Regards

Mario




--
Mário Alberto Chaves Moura
[EMAIL PROTECTED]
31-9157-6000

Reply via email to