Questions tagged [switchers]

19 questions
13
votes
5 answers

jQuery Refresh/Reload Page After Success

have a style switcher bar across the top of my theme. It works for the most part, but you have to hit F5 or Refresh to see the new style. How do I finish this jQuery to auto-refresh upon a successful execution? jQuery.fn.styleSwitcher =…
Greg
  • 193
  • 1
  • 4
  • 13
6
votes
4 answers

How to switch between Class using addClass & removeClass?

I create my own Switcher jQuery, and I want to remove class when click on another color, for example : I have "blue" class on body tag and when someone click on red should remove the blue class and replace it with red class etc.. Code…
3
votes
2 answers

Any open source Alt-Tab windows switcher project exists?

Having tried a few Alt-Tab windows switcher, I want to write one to suit my own needs. Are you aware of any open source Alt-Tab windows switchers? If it already exists, I don't want to start from scratch :)
netvope
  • 7,647
  • 7
  • 32
  • 42
2
votes
0 answers

i18n locale switcher does not redirect to current page in production (rails4)

I'm working with an application with three languages initially. I've made a switcher that works OK (in development and in production) but redirecting to the home page. I just want the switcher to redirect to the current page, so I've been dealing…
1
vote
1 answer

How to fix: "Switch" statement in Python doesn't recognise input string

I need to parse some action given by a client. The action is a simple string contained the word action: "load", "start", "pause",.... I come from C world and I am a newbie in Python. I need a switch statement and I did it with the switcher.get()…
Giulio
  • 150
  • 2
  • 11
1
vote
0 answers

How to implement textSwitcher with inimation inside Ontick

I am creating a code to show animation of text (sliding from top to bottom) and that text is changing every second, I am using a CountDownTimer and a textSwitcher. Please refer to the code below. the code compiles normally, however it crashes the…
Moat
  • 11
  • 3
1
vote
1 answer

how to implement color switcher for each image

I'm developing e-commerce website in cakephp 2.x, in which admin can upload many images and each image will have individual color. " Problem is how to give option to admin to choose color for each image." like image A has color black, Image B has…
coder
  • 156
  • 3
  • 23
1
vote
2 answers

JavaScript style switcher in Wordpress

I'm trying to implement a simple Toggle based style switcher in Wordpress. The solution was originally written for HTML. It can be found here. The necessary .js files can be found there. Look at Vitch's comments below to correct one error in the…
Ian Douglas
  • 97
  • 1
  • 1
  • 8
0
votes
2 answers

How to switch store in magento automatically basing on the visitors IP address

I am using magento 1.5, I already created different stores in my store. I created stores based on language. English Chinese German French Spanish i want to trap the the Ip address of the visitor. If the ip is from france, the store will…
reylimjr
  • 361
  • 8
  • 16
0
votes
4 answers

jQuery theme switcher for multiple stylesheets

I would like to use this styleswitcher script (http://www.kelvinluck.com/assets/jquery/styleswitch/),but have it load 2 stylesheets at once. The objective is the user can select a font size and/or colour and/or screen width. Not sure if it's just a…
PaulW
  • 7
  • 4
0
votes
1 answer

Switcher not going to functions

I'm not sure why I keep getting an error for the "print func()" part, saying it's an invalid syntax. I'm trying to have the switcher go to a definition for each value it receives. The code runs the loop properly it's just the switcher part I'm…
0
votes
1 answer

How can I set the bootstrap switcher by default to ON?

I am using the Bootstrap Switcher (https://bttstrp.github.io/bootstrap-switch/examples.html)

peace_love
  • 6,229
  • 11
  • 69
  • 157
0
votes
3 answers

Python 3+ Is It Possible to Replace if in and elif in Using a Switcher

I know how to use a dictionary as a switcher in Python. I'm not sure how to use one for my specific case. I think I will just need to use if, elif, and else but hopefully I am proved wrong by the community :) I want to make a find/replace function…
probat
  • 1,422
  • 3
  • 17
  • 33
0
votes
5 answers

input text change onclick button value

Actually i want to create a page switcher, all i need for this is an input with type text where will be entered the number of the page, and i have the second input with type button and onclick value:
abrabr
  • 217
  • 5
  • 14
0
votes
2 answers

function + swticher in python

I have an issue with the use of functions and switcher in python: I have this production cost function: def fcostoproduccion (X,periodo): if X > 0: switcher = { 1: 200 + 15 * X, 2: 100 + 20 * X, 3: 100 + 4…
1
2