d2jsp
d2jsp Forums > Programmer's Haven > Web Languages > I Go Crazy If I Dont Fix It Soon > Please Help O Fg
Add Reply New Topic New Poll
ser1990
#1 Jul 9 2018 12:04pm
Group: Member
Posts: 2,245
Joined: Mar 5 2009
Gold: 299.59
Guys I have the following code

Quote
$('.img-2').parent().addClass('preview');
$('#image').parent().removeClass('preview');
$('.img-2').each(function() {
var $imgsrc = $(this).attr('src');
if (!$hoverSize) { $imgsrc = $imgsrc.replace(/cache/, ""); }


I want to Identify the class on a website to add this popup feature on hoovering the items.
Who can help me i can send the site on pm, thanks!

PumperNickle
#2 Jul 10 2018 09:22pm
Group: Member
Posts: 2,631
Joined: Jan 14 2008
Gold: 0.00
if I understand correctly, using jquery, I think you are looking for the .hasClass() function.

as in:
Code

if($('#image').hasClass('preview')){

}



ser1990
#3 Jul 10 2018 11:47pm
Group: Member
Posts: 2,245
Joined: Mar 5 2009
Gold: 299.59
Quote (PumperNickle @ 11 Jul 2018 06:22)
if I understand correctly, using jquery, I think you are looking for the .hasClass() function.

as in:
Code
if($('#image').hasClass('preview')){

}


Well I understood from another person, that I dont need to add this java script to get the pop-up because I already have a .css for a effect made on that element.
And I need to edit the .css, what I found on stacks i tried and didn't work, I need someone more advanced with coding to take a look, Im willing to pay fg, thanks.
POL1Z1STENS0HN
#4 Jul 11 2018 08:22am
Group: Member
Posts: 3,000
Joined: Dec 7 2016
Gold: 6.76
have you tried turning in off and on again?
MrGosu
#5 Jul 11 2018 04:23pm
Group: Member
Posts: 334
Joined: Apr 10 2004
Gold: 1,053.00
send me a fiddle / site link and I'll have a look
ser1990
#6 Jul 12 2018 02:32am
Group: Member
Posts: 2,245
Joined: Mar 5 2009
Gold: 299.59
Quote (MrGosu @ 12 Jul 2018 01:23)
send me a fiddle / site link and I'll have a look


I send you pm if u want i can send you cpanel details as well, ty.
JohnMiller92
#7 Jul 13 2018 01:57pm
Group: Member
Posts: 16,621
Joined: Jan 7 2017
Gold: 90.58
> jquery in 2018


repent, and fast

This post was edited by JohnMiller92 on Jul 13 2018 01:57pm
Go Back To Web Languages Topic List
Add Reply New Topic New Poll