Frage

I have got stuck in a dump issue but am not able to work it out , I have a range selection of age through two select input buttons. I took the code from the mark up and it works on the fiddle but not on the page.

I have tried putting the script on the view file,layout header and at the end of view.

But it never worked.

War es hilfreich?

Lösung

There must be some JS error. Track down any error you may be getting using Firebug in Firefox or Chrome Inspector in Google Chrome. Make sure you have included jQuery.js in your cakephp page. Also please note that it's not supported in all the browsers, so you can use Polyfill if there is any browser specific issue.

Updates:

Lets try another approach, instead of getting the value of first input on clicking the second one, What if we try to set a value for second input on changing the first one.

$("input#range1").bind('change',function(){
   $("input#range2").val(this.value);
});

Demo: http://jsfiddle.net/VBrEj/12/

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top