you don't need to set a blank value either, although it's also the case on anything that's set to disabled
Well, I had trouble with val("") to force it to be reset at one point which is why one of the selects got an option with value 0 even though it would never be actually used for anything.
No no. It doesn't change a thing... data-hide will simply mark the item to not show up in the list. It's one of these neat little 'extra' sbox features I'm proud of
I was concerned that it would break things, because there is more than one place where a default value should be thrown at the user so they have to do something but it looks like it all works properly
:)It only broke because I'd removed the empty value on the data-hide. After noticing that it showed an area it shouldn't, I quickly restored the empty value and all was well.
Yeah, it's funny like that, though I need to change some of the code slightly as it happens because that screenshot showed me an interesting bug from the code, not a hard one to fix though.
BTW, that UI is really cool It's like a conversation between the admin and the website...! Or a wizard, if you like!
Thanks
:) That's really the point: there's no other way I could think of doing this than as a wizard type deal, simply because of the complexity involved in getting all the information required. The only decision was whether to string it out over several pages or do it all in JS in the one page.
.toggle(true) = .show()
.toggle(false) = .hide()
.toggle(hello) = {
if (hello)
.show()
else
.hide()
}
See, I forget stuff like that. It doesn't help that I haven't touched jQuery much in the last 3 months, I've been working mostly in Impact which is a very different beast, though it does all kinds of neat stuff with classes and extending thereof.
I'd love to be able to do ($something = $param || 0) in PHP
As an expression? What should that expression mean logically? (Seems to me like it means $something = (bool) $param)
Well, it's just an example. Of course PHP has default values for function parameters, but it'd be nice to have it everywhere.
Oh, essentially being shorthand for $something = isset($param) ? $param : 0, I see. The thing is, JS has a very different idea of what a variable is compared to PHP and I think I prefer PHP's idea in that direction.