Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Konflikt biblioteki jQuery z byslidemenu-2.1.3.js ...
Elber
post
Post #1





Grupa: Zarejestrowani
Postów: 381
Pomógł: 12
Dołączył: 9.07.2007

Ostrzeżenie: (0%)
-----


Witam, mam problem...mam slider w jQuery który działa ok i menu (byslidemenu) po lewej które działa tylko w momencie gdy załaduje w <script> biblioteki jQuery a jak jej nie załaduje to nie działa slider ... jak rozwiązać ten konflikt ? Tutaj link http://www.techos.pl/smolin/oferta.html

Konsola błędów pokazuje:
Uncaught TypeError: Object [object Object] has no method 'getElements' w http://www.techos.pl/smolin/js/byslidemenu-2.1.3.js w 37 linii


Cytat
33: initialize: function(options) {
34: this.setOptions(options);
35:
36: var menu = $(this.options.container);
37: this.elements = menu.getElements(this.options.selector);
38: var elements_count = this.elements.length;


Ten post edytował Elber 24.01.2012, 20:28:44
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Elber
post
Post #2





Grupa: Zarejestrowani
Postów: 381
Pomógł: 12
Dołączył: 9.07.2007

Ostrzeżenie: (0%)
-----


Czytałem o jQuery.noConflict i próbowałem wstawić ale robiłem to źle ... wstawiłem ale teraz wywala error do linijki 36:

Property '$' of object [object DOMWindow] is not a function

36: var menu = $(this.options.container);

Aj źle wstawiłem...teraz wstawiłem dobrze tak jak podałeś:

<script type="text/javascript">
var j = jQuery.noConflict();
j(document).ready(function(){
j('.slider').carousel({});
});
</script>

ale nie działa slider, za to menu działa (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 00:57