Youjoomla Support Forums (http://www.youjoomla.com/joomla_support/index.php)
-   Anything Goes (http://www.youjoomla.com/joomla_support/forumdisplay.php?f=31)
-   -   Enable accordion over JS not work (http://www.youjoomla.com/joomla_support/showthread.php?t=11771)

zemnet 10-28-2013 05:19 AM

Enable accordion over JS not work
 
Hi,
on ZemNet - Internet a IT - Internet I have accordion.
If I do enable it over data-toggle, it work well,
but if I want to enable it over Javascript, I have an error in JS console
Code:

[09:15:49.838] TypeError: $(...).collapse is not a function @ http://new.zemnet.sk/domacnosti/internet#cennik-internet:228
and accordion not work.

Thanks for your help
Viktor

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 2.5

MySQL Version: 5.x

PHP version: 5.x

Link to installation: ZemNet - Internet a IT - Info

Have you edited any files? If yes tell us which ones.: No

Is this personal or client website?: Personal

zemnet 10-28-2013 07:29 AM

Modal window not work correctly, because when I reload the page, modal window is opened, but I can't close it, only if I open it with clicking on first "Vzdialená pomoc" icon, window is modalized, and then I can close it.

zemnet 10-28-2013 10:47 AM

Quote:

Originally Posted by zemnet (Post 53251)
Modal window not work correctly, because when I reload the page, modal window is opened, but I can't close it, only if I open it with clicking on first "Vzdialená pomoc" icon, window is modalized, and then I can close it.

modal is ok, but accordion not work.

zemnet 10-29-2013 06:05 AM

Via data attributes works all, but over javascript not work neither tabs.

arefund 10-29-2013 11:07 AM

Hello zemnet.

That is jbootstrap default accordion.

Bootstrap Javascript | Shortcodes

Your jbootstrap should be on.

Thank you.

zemnet 10-29-2013 12:35 PM

jbootstrap is enabled. if i will remove data-toggle attribute, accordion not work,
over javascript I can't start with collapse() function.

Now is site without data attribute and accordion not work.

zemnet 10-31-2013 07:27 AM

Can you help me, I need javascript control of accordion (or tabs) for my site for customization. Tabs over javascript not working too.

neo 10-31-2013 09:25 AM

and where did you include the js and how?

neo 10-31-2013 09:26 AM

you get collapse is not a function because you are not wrapping the script inside jquery no conflict so it defaults to mootools and mootools has no collapse

jQuery.noConflict() | jQuery API Documentation

neo 10-31-2013 09:28 AM

Code:

jQuery.noConflict();
(function( $ ) {
  $(function() {
    // More code using $ as alias to jQuery
        $(".collapse").collapse()
  });
})(jQuery);

should work


All times are GMT -4. The time now is 07:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.