Code for jQuery Mobile selector menu? - jquery-mobile

I must be missing something obvious. I'm looking at the docs for jQuery Mobile, and nowhere do they give you the code to do the stuff they're demonstrating. I'm trying to create a selector menu... Where can I get the code for this (it must be like, one line, right)?
As a complete newbie, I'm at a loss here. Thanks for any help!

To get the code:
remove the # from the link: jquerymobile.com/demos/1.0a4.1/docs/forms/forms-selects.html
open in browser
view source (the old way, not with firebug or anything)

Related

Why does the angular-material `Getting Started` example not actually work?

Is it just me, or is the angular-material "Getting Started" example broken?
On that page (link above), there's an inline codepen to show using angular-material. But the demo doesn't work! (In particular, I don't see a button to collapse the sidebar.)
Since I used this example in my started project, I spent quite some time troubleshooting it -- to no avail. Then, I realized the example itself it may be broken. And sure 'nuff, it is!
Does anyone know what the actual bug is, so I can work around it on my test app? It must have worked at some time; but I can't figure out why it's broken now.
Thanks!
That particular pen is working fine for me but I have noticed a few are not working, and it's due to the angular-material.js link being incorrect in the dependencies (under the pen's settings) the link provided redirects to the CSS.
This is intentional - the sidebar only becomes collapsable on smaller screens and is open on larger screens. Shrinking your browser window will show the collapse button.
That being said, the Getting Started page is definitely in need of an update. It is a good guide for a basic page structure, but the individual demo pages will be a lot better if you're looking to try out some of the components. (Every demo has a CodePen link to open an editable version.)

Angular.Dart javascript interop error

I have problem with my code which is using 3rd party library. When I use it in the plain Dart itself it already works, but not with Angular.Dart. I have used chapter3 from Dart tutorial and just added my code in recipe_book.dart which is compoment.
Place where the code fails is shown in the picture below. After i get
Breaking on exception: object must be an Node, ArrayBuffer, Blob, ImageData, or IDBKeyRange
I don't have idea how to get rid of this:-( Maybe it is something somebody more familiar with Angulart.dart can answer right away.
Anybody willing to help can check the code here on github
The debugger shows it is already a JsObject, just omit the new JsObject(...) call.

Highcharts & Joomla debug

I've been playing around with highcharts for the first time because it looks amazing! I'm trying to implement it on the Joomla platform but don't seem to be able to get it working.
I think I've successfully called the highcharts.js and jquery in the head. And I've added the div with the sample code down the page but the chart does not seem to be drawing. If I look at the console in firebug I can see there is a syntax error but unfortunantly I can't see what might be causing it given that I just cut and paste the sample code.
Thanks in advance,
Rowan
It looks like a problem with jquery / mootols problem, have you tried to use highcharts mootos wrapper without jquery or use noConflict jQuery.noConflict(); ?
Ah fixed it myself, I googled the error Uncaught SyntaxError: Unexpected token ILLEGAL and it turns out sometimes when you copy and paste js it does some weird things at the end. So I deleted the last line and simple retyped it and hey presto!

Automatic Typing Textarea/input/form in JavaScript

I've been searching for a way to make a textarea type inside of itself. Unfortunately, even with some google searching, I still don't have a clue? Do you guys know where to start with this?
http://lmgtfy |dot| com is an example, but I'm not sure if they use some other technique...
The lmgtfy people are simply using javascript to change the value of the input. Here is a simple jsfiddle showing the same thing:
http://jsfiddle.net/Caut6/1/
LMGTFY uses javascript. If you visit the site using chrome or some other browser with a debugger, you should be able to pause javascript execution and check out how they do it, then roll or copy your own version.
In Chrome, the pause button is under the Scripts area. Their bundle.js files appears to host the JS you are looking for, it is around 1000 lines of code, but you should be able to see the few functions you need to borrow their implementation.
Hope this helps.

Debugging Django Admin Template Resolution

Can someone point me to the code or a way that I can say print to screen which admin template is being used?
It happens many a time when I am replacing a admin template for an model that I add the template and hit the page and bham... still the same template.
Usually its a case issue or something like that... but it takes me a while if I get stumped to realise what my issue is.
Can anyone suggest an approach, be it put print statements in django code to show which template is getting resolved?
Regards
Mark
Use the django-debug-toolbar, it has a tab that shows all the template_s_ (plural) that are used.
If you run Django's development server from the command line, you can definitely just use print statements to find out which template is being used. You can also use the FireBug plugin for Firefox to figure out what the server is sending back to you.

Resources