jQuery with css file -


Hello Can someone tell me the best way to use the drop down items in the combo box below to jquery code I can change it instead of the link shown here. Please open the css file 'business.css' and display in the text field thanks rifki

  a href = "css / business.css" class = "link" & gt; Business style & lt; Script & gt; $ (Function () ($ ('(link'). (Function () {$ .get (this.href, blank, function (css) {$ ('# css') .css (css); return False;});});});   

< P> If this was your HTML code ...

  & lt; Select ID = "stylesheet list" & gt; & lt; option value = "" & gt; please select & lt; / Option & gt; option value = "test.css"> test.css  gt; & lt; option value = "other css file. Css" & gt; other css file.css & Lt; / option & gt; & lt; / select & gt; 
Textarea id = "stylesheet text">

You can then enter this with the event on the drop down list Can use jquery ...

  $ (document) .ready (function () {$ ("# stylesheet list"). Change (function () (if (($ (this Val (""); return;} $ .get ($ (this) .val (), function (data) {$ (" # Stylesheets text "). Val (data);});});});  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -