/* * jQuery JavaScript Library v1.3.2 * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H) ...Tutaj część ukryłem... $(function (){ $(".suwak").hover(function(){ $(".suwak").stop(true, false).animate({left:"0"},"medium"); },function(){ $(".suwak").stop(true, false).animate({left:"-112"},"fast"); },500).click(function(){}); return false; });
i wyświetlam to tym:
no i ok wszystko działa, tylko że ja chciałem w <div class="suwak"> umieścić to:
<a href="java script:chooseStyle('none', 60)" checked="checked">Default style</a>
<a href="java script:chooseStyle('blue-theme', 60)">Blue theme</a>
<a href="java script:chooseStyle('brown-theme', 60)">Brown theme</a> - do zmiany stylu: (http://www.dynamicdrive.com/dynamicindex9/...eetswitcher.htm)
</div>
Oczywiście dodaje też te style i plik js, ale ten suwak w ogóle się nie pokazuje.
W skrócie: Chcę na takim wysuwanym suwaku umieścić kod do zmiany stylu, ale to nie działa.
edit:
Już wiem dlaczego nie mogę tego zrobić. Nie mogę ponieważ to Sizzle CSS Selector Engine - v0.9.3, czyli wszystko co na tym musi być jest w selektorze w pliku css (.suwak). Czy jest jakiś inny sposób? Zależy mi na czymś takim co wysuwa się z lewej storny ekranu, po najechaniu na "wystający" element na którym miałbym divy 20x20px do zmiany koloru tła (strony).