auto object positioning (maybe artificial velocity?)
Im not really sure how to go about this, but one idea that i had was artificial velocity. let me explain the problem first though before i see if my idea is feasible.
The problem:
I have 5 buttons, and 5 groups.
Each group has 8 objects (every group has the same essential objects that are the same sizes)
Basically, each button makes a group dissapear or appear.
If all the groups were visible, it would look like this:
group 1
group 2
group 3
group 4
group 5
But if just groups 1 & 5 were visible it would look like this:
group 1
group 5.
do you see my problem?
my idea to fix it was to make some kind of container around each group. the container would somehow move the whole group of objects as if it was one.
then, i was thinking of doing something like this:
if (container1's top isn't touching another container's bottom){
give container1 a negative, exponential velocity. //this way it would look very smooth
}
else{
dont move it
}
does this sound feasible or is there a better way?
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
The only thing is my positions are absolute instead of relative.
If I were to change them to relative, I think what I would do is try to make everything inside some kind of a frame.
How would I do that?
What i mean is make a box x pixels high and x pixels wide so that the box can just be posted into the middle another html file that has other things outside of the box.
Just use an outer <div> that you position absolutely and then the inner <div>s don't even need to be relatively positioned, at all. They can just "flow" naturally.
But if you won't show us code, all we can do is make general suggestions.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
I don't see why you are posisioning them as p tags align themselves under eachother anyway. I would go with Old Pedant on this use an outer div to position the list on the page and then use display for show/hide toggles.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
Well, I think you could have gotten rid of some of the <div>s, but yeah...that's what I meant.
Yeah it was a quick mock-up I wasn't really trying to make it small or large, I just coded lol.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
Its just like the version you showed us in the image just with better usage.
You can hide any section you want by clicking the buttons on the side and once you hide a section it wont get sent when you submit the form. You just have to update my html with your codes so things such as add budget would need to be added etc.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
Basicly it says if display is none or display is empty set display to block, now even though the display has been set to none in the css the javascript doesn't detect it as it is not on the html tag itself, so on page load all div's with class as boxItem will have no display so the display is empty until you click on the button and then the javascript adds the display style to the html tag dynamically so every time you click it the display gets changed.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
Basicly all I did was use floats and clear:both these allow you to position elements on the page while keeping width's and height's intact.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
set the class like this class="boxItem push20" and then in the css you put this div.push20 {margin:20px 0 0 0;}
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P