Home › Forums › JavaScript › Collapse/Expand JS
- This topic is empty.
-
AuthorPosts
-
August 12, 2014 at 6:41 am #178716
Black Mamba
ParticipantI’m sorry if that “Any ideas?” comment came across as me being impatient or demanding anything. That was not what I meant. At all!
I know it’s a lot of code and for that reason I guess I was expecting something like “Okay, got it. I’ll look into it when I get a chance”.
I’m nothing but appreciative of all the help you’ve given me.
Anyway, it worked!
Just had to remove one curly bracket from the second chunk of code. (Dreamweaver warned me about it)
if(dd.n4 && dd.e.but > 1 && dd.e.src == d_o.oimg && !d_o.clone){ return false; if($(d_o.div).height()){ //much more reliable d_o.h = $(d_o.div).height(); } if(d_o.visible && dd.e.but <= 1 && dd.e.x >= d_o.x && dd.e.x <= d_o.x+d_o.w && dd.e.y >= d_o.y && dd.e.y <= d_o.y+d_o.h) {Thanks a lot!
August 12, 2014 at 7:13 am #178721Black Mamba
ParticipantIt’s not that one.
It’s the one after return false;August 12, 2014 at 7:32 am #178726Black Mamba
ParticipantWith that curly bracket there Dreamweaver warns me about a syntax error on line 1210. If I ignore that and preview it in Safari it doesn’t work.
Without that curly bracket it works flawlessly!
August 12, 2014 at 7:52 am #178730Black Mamba
ParticipantOK, I got.
You said “The middle if-statement is new.” so I only copied that if-statement. But you’ve also opened a curly bracket before “return false” (which I hadn’t copied) so it had to be closed.
Anyway, it was working without both curly brackets, but if you say they should be there, I’m gonna put them there…
Thanks again.
August 13, 2014 at 1:37 am #178841Black Mamba
ParticipantGot it, thanks.
Just one other question.
You’ve seen the drag/drop and fade in/out on hover effects.
Do you think it’d be too hard to add support for touch devices or fairly doable?I’ve been reading quite a lot about it (great article here) but haven’t quite gasped how hard it would be for a site like this.
Would something like this and this do it?
Thanks.
August 13, 2014 at 11:27 am #178912Black Mamba
ParticipantSome weird stuff is going on. I was trying to post, I’d click ‘submit’ but the comment would never show up.
Will this one show up?
August 13, 2014 at 11:35 am #178916Black Mamba
ParticipantIt did! Hip hip hooray!
Anyway…
I read that, but I’m not sure I get it.This is what I was trying to do.
It would solve the issue with the hover effect. Wouldn’t it?
I’d test it, but I currently don’t have a touch device with me.
August 13, 2014 at 11:38 am #178917Black Mamba
ParticipantNow it didn’t work again.
I removed a link I was trying to post and it worked… how weird!This is the link: http://bit.ly/1m07grB
Let’s see if it works this way…
August 13, 2014 at 11:40 am #178918Black Mamba
ParticipantYep, it was the address that was causing some sort of issue…
August 13, 2014 at 12:43 pm #178928Black Mamba
ParticipantWould this not work?
August 13, 2014 at 1:12 pm #178915Black Mamba
ParticipantIt did! Hip hip hooray!
Anyway…
I read that, but I’m not sure I get it.This is what I was trying to do.
http://www.hnldesign.nl/work/code/mouseover-hover-on-touch-devices-using-jqueryIt would solve the issue with the hover effect. Wouldn’t it?
I’d test it, but I currently don’t have a touch device with me.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.
