Modals and styled elements

9 views
Skip to first unread message

Ben

unread,
Nov 3, 2011, 8:53:04 PM11/3/11
to LivePipe UI Users
Hi All,

I have a fundamental problem with using LivePipe that I hope someone
can help with.

I have a list of anchors, each with a different url link. Each should
open a modal related to the link.

I don't want to create separate modal objects for each one- I only
need one, which loads up the link content when summoned.

Unfortunately, it seems like one can only bind a modal to a specific
element, by ID. This means I can't see a way to make a general use
modal object that will serve all my anchor elements.

Any ideas? Am I being stupid?

Thanks!
Ben

Ben

unread,
Nov 3, 2011, 9:03:10 PM11/3/11
to LivePipe UI Users
Ok, well, I got it working like this:

Event.observe(window, 'load', function() { init() });
var modals=new Array();
function init() {
els = $$('a.respond');
els.each(function (el) {
modals[modals.length]= new Control.Modal(el,{
overlayOpacity: 0.3,
className: 'modal',
fade: true
});
});
}

<a href="urltoopen" class="respond">HERE</a>

Any more elegant solutions welcome!

H.G.A. Hendriks

unread,
Nov 4, 2011, 3:29:27 AM11/4/11
to livepipe...@googlegroups.com
Hi,
This is what I do:

1. Place a hidden element somewhere on your page.
2. Initiate a named modal linked to that element on page load.
3. Use the named dialog for whatever you want to achieve. There are
plenty of methods available to manipulate your modal object.

Hope this helps.

Henk

Op 4 nov. 2011 om 01:53 heeft Ben <ben.p...@petromediacorp.com> het
volgende geschreven:

> --
> You received this message because you are subscribed to the Google Groups "LivePipe UI Users" group.
> To post to this group, send email to livepipe...@googlegroups.com.
> To unsubscribe from this group, send email to livepipe-ui-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/livepipe-ui-users?hl=en.
>

Ben

unread,
Nov 4, 2011, 8:12:49 PM11/4/11
to LivePipe UI Users
Thanks Henk.

Ben

On Nov 4, 12:29 am, "H.G.A. Hendriks" <hendriks....@gmail.com> wrote:
> Hi,
> This is what I do:
>
> 1. Place a hidden element somewhere on your page.
> 2. Initiate a named modal linked to that element on page load.
> 3. Use the named dialog for whatever you want to achieve. There are
> plenty of methods available to manipulate your modal object.
>
> Hope this helps.
>
> Henk
>
> Op 4 nov. 2011 om 01:53 heeft Ben <ben.pet...@petromediacorp.com> het
Reply all
Reply to author
Forward
0 new messages