Note that there are some explanatory texts on larger screens.

plurals
  1. PODropdown-Box Setup
    primarykey
    data
    text
    <p>this question is related to my previous post about changing the URL of an href-tag when clicking on some switch. <a href="https://stackoverflow.com/questions/12910487/jquery-change-url-depending-on-click-or-selection">Link</a></p> <p>I now have set up something different since I couldn't get anywhere. The href-changing now works but I cannot get the selected icon plus name to show in the dropdown-box. </p> <p><a href="http://jsfiddle.net/hH8EQ/" rel="nofollow noreferrer">JSFiddle</a></p> <p>So for example if "German" is selected then it should appear with the according flag icon as the current selection in the dropdown-box.</p> <p>Is my setup wrong or what does it take to fix this?</p> <pre><code> &lt;div id="language-selection"&gt;&lt;div id="current-language"&gt;&lt;span class="element-invisible"&gt;Current language:&lt;/span&gt; &lt;img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_United_Kingdom.png" alt="English" title="English" /&gt; English &lt;/div&gt; &lt;div class="element-invisible"&gt;Switch to:&lt;/div&gt; &lt;ul id="other-languages"&gt; &lt;li class="zh-hans first"&gt;&lt;a href="javascript:;" data-lang="Chinese" class="clickButton"&gt;&lt;img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_China.png" alt="简体中文" title="简体中文" /&gt; 简体中文&lt;/a&gt;&lt;/li&gt; &lt;li class="en"&gt;&lt;a href="javascript:;" data-lang="English" class="clickButton" &lt;/a&gt; &lt;span class="language-link"&gt;&lt;img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_United_Kingdom.png" alt="English" title="English" /&gt;English&lt;/span&gt;&lt;/li&gt; &lt;li class="de last"&gt;&lt;a href="javascript:;" data-lang="German" class="clickButton"&gt;&lt;img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_Germany.png" alt="German" title="German" /&gt; German&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;ul&gt; &lt;li&gt;&lt;a class="clickButton" href="folder1/firstLink/Languages/English/folder/index.html"&gt;Index Link&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="clickButton" href="../folder2/secondLink/Languages/English/folder/index.html"&gt;A different Link &lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="clickButton" href="../../folder3/Languages/English/folder/index.html"&gt;Another different link&lt;/a&gt;&lt;/li&gt; &lt;ul&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload