sweetysweety — 2013-05-22T08:01:45-04:00 — #1
leftPos = Math.round($el.position().left);
i'm trying to add 5px to leftPos and assign the result of it to
how can i do this?
paul_wilkins — 2013-05-22T19:16:11-04:00 — #2
If it is $el that you are wanting to adjust, you can do it with jQuery via the .css() method
As it says there:
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
sweetysweety — 2013-05-23T05:04:35-04:00 — #3
i'm trying to start the red panel appearing under the buttons from the box on the left of first button.
paul_wilkins — 2013-05-23T07:24:22-04:00 — #4
There are too many levels of indirection in that statement making my brain feel numb so can you please rephrase?
Are you wanting the red panel to start the red panel underneath the buttons and to then have it pop up to the same level of the buttons?
Or, are you wanting the red panel to start at a similar distance from the left button, as it is from the next?
Or is it something else?
If it's the middle option, you can just make it visible and set its left position to be the same as its width, that being 47px
sweetysweety — 2013-05-23T07:53:38-04:00 — #5
i'm tryin to sayin the colorful panel will slide,when i click at at any button and come under the button's position.
but it begin to slide under the 1st block.
i made it begin at 47px position but when i clicked some button it comes 47px left of that button.i do not want this.i want it to stop under the buttons location.
paul_wilkins — 2013-05-23T08:07:50-04:00 — #6
Okay, thanks for clearing that up. It seems to work perfectly well when I view it in google chrome, so it appears that you may be experiencing a bug in the web browser that you are using.
Which web browser are experiencing the issue with?
sweetysweety — 2013-05-23T10:52:41-04:00 — #7
no no it is not working perfect.when you press the button,the panel appears a low opacity at the beginning.i don't want to see this situation.
paul_wilkins — 2013-05-23T16:11:30-04:00 — #8
What do you want instead?
sweetysweety — 2013-05-24T03:37:47-04:00 — #9
the panel should begin to show itself under the 1st block.that's what i wanted.