Home › Forums › JavaScript › Making random not so random
- This topic is empty.
-
AuthorPosts
-
February 1, 2017 at 3:14 am #250787
Shikkediel
ParticipantSomething like this?
Just use the first div inside the box for adding any content…
It’s not superbly optimised, I have to say. I was trying to get it’s coordinates with
position()
but was getting odd outcomes there. So I calculated the center position directly, which isn’t very versatile.February 1, 2017 at 3:56 am #250789Shikkediel
ParticipantJust reporting another small forum glitch… sorry @chriscoyier, not sure who else to bother with this even after looking at the team page. And posting in the specific thread seems a bit more direct than an email.
Anyway, this thread has four pages of which only two are showing on the forum topic overview page:
Also, after posting another reply here it will redirect to that second page…
February 1, 2017 at 4:59 am #250790Chris Coyier
Keymaster@Shikkediel Thanks I’ll log that as a bug. I can confirm what you’re seeing. I’m not entirely sure what to do about it. Hopefully it’s a bbPress bug that will kinda fix itself.
February 1, 2017 at 5:03 am #250792pwalls
Participant@shikkediel Thank you for this. I really appreciate the prompt response.
Actually, I wanted this to be done in the example you shared earlier –
http://codepen.io/anon/pen/myWMvN. This would exactly match my requirements.
PS- I am a beginner at javascript so your help here will make things easier for me.
February 1, 2017 at 5:45 am #250799Shikkediel
ParticipantThanks for the reply, Chris. Not a big deal of course, just thought I’d give a heads up. It seems to have added a third page now by the way.
That one’s a bit more complicated, pwalls. I’ll have to take a good look at it, a reply on that might not be that swift as the earlier one.
What should happen with the center element when the items are aligned though? I’d have to take that into account when switching functionality.
February 1, 2017 at 5:59 am #250803pwalls
Participant@Shikkediel I dont need elements to be aligned as shared in the demo and you can skip the alignment tab functionality please.
February 1, 2017 at 6:29 am #250808pwalls
ParticipantFor reference, I Have created pen:-
http://codepen.io/pwalls/pen/mRxbeP
The Grey circles should not overlap the Red square positioned in the center on first view (currently visible viewport). The circles can overlap the Red square as you keep scrolling. So mainly I just want to avoid the overlapping on page load.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.