javascript - Conflicts between jQuery and fancybox -
my jquery function gets info box , shows external .html in window fancybox. html url selected box value string. here have no problems that.
i have legend shows box value in categories. legend can show or hide on click (jquery). legend function works good.
the problem when use fancybox function legend function doesn´t work (i try hide , starts hide , show in cycle)
what can problem? idea?
thank you.
the code:
$('#legend h3').click(function (e) { e.preventdefault(); if ($(this).hasclass("contracted")) { $(this).removeclass("contracted"); } else { $(this).addclass("contracted"); } $(this).parent().find('.content, .slider').slidetoggle(); }); $(document).on("click", "#ctrl_info", function (e) { e.preventdefault(); var unlo= $("#sidebar nav ul li.expanded .first_select option:selected").val().replace(/ /g, "_").tolowercase() + ".html"; var dolo= $("#sidebar nav ul li.expanded .second_select option:selected").val().replace(/ /g, "_").tolowercase() + ".html"; $.get("my_url/" + $("#sidebar nav ul li.expanded .first_select option:selected").val().tolowercase().replace(/ /g, "_") + ".html", function (html) { $.fancybox(html); }); });
Comments
Post a Comment