Revision history [back]

click to hide/show revision 1
initial version

asked 2015-11-24 13:54:05 +0800

WilliamB gravatar image WilliamB

How to use Jquery side library with zk ?

I'm trying to build a simple timeline from a simple slide. I went with http://bxslider.com/ as it has all the option i need.

I'm making a custom component that will generates "li" for each of the entry of my model.

The issue is I will have several of those timeline on one page. So I'm trying to use the jq selector from uuid. First issue, UL being a native component, id will not be generating a uuid. So I've added a container

in which I'll add the UL in java.

Now my problem is when I use the jq selector i get anerror :

If in my JS I use the default jquery selector it works :

$('ul.bxslider').bxSlider();

But when i use the jq selector with the id!

jq('$container > ul').bxSlider();

"Uncaught TypeError: jq(...).bxSlider is not a function"

When i evaluate both of those in the console i do get the slider ul though ... So how can i call external Jquery lib method from the zk jquery selector?

Thanks

How to use Jquery side library with zk ?

I'm trying to build a simple timeline from a simple slide. I went with http://bxslider.com/ as it has all the option i need.

I'm making a custom component that will generates "li" for each of the entry of my model.

The issue is I will have several of those timeline on one page. So I'm trying to use the jq selector from uuid. First issue, UL being a native component, id will not be generating a uuid. So I've added a container

in which I'll add the UL in java.

Now my problem is when I use the jq selector i get anerror :

If in my JS I use the default jquery selector it works :

$('ul.bxslider').bxSlider();

But when i use the jq selector with the id!

jq('$container > ul').bxSlider();

"Uncaught TypeError: jq(...).bxSlider is not a function"

Same issue with jq('ul.bxslider')

When i evaluate both of those in the console i do get the slider ul though ... So how can i call external Jquery lib method from the zk jquery selector?

Thanks

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More