Link to home
Start Free TrialLog in
Avatar of deanlee17
deanlee17

asked on

Editing Query list selection click

Hi guys,

Basically I have this page:

http://test.urban-indoors.co.uk/shop/all-fires/all-fires/dimplex-chalbury-electric-fire-1113964.html

The essential extras are list items, I now want to change them so as the user actually has to click the 'Click to add this product to your selection' button rather than just anywhere within the <li>

Is this possible?

Thanks,
Dean.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deanlee17
deanlee17

ASKER

Hi Chris,

Thanks for the reply, I implemented those changes, no change tho?

Cheers,
Dean
There are changes. The click event is now bound to your img, so when you click on it your code runs. It puts a tick in the box, hides the button and submits your form.

You will need to change some of your CSS as well. Currently you're setting the cursor to the pointer:

//line 1534 of stylesheets2013c.css
#relatedexpress li { cursor:pointer; } <!--remove this

//Add this to stylesheets2013c.css
#relatedexpress li .message img { cursor:pointer; }

Open in new window

Thanks Chris, that works perfectly.

Just one last thing, I am going to put another image in there, how can I make our changes unique to just that one image?
Give it a class and then change the jQuery selector:

<img class="extrasButton" src="..." />

and your jQuery selector:

$("#relatedexpress .extrasButton").click(function()) {
Perfect, thanks a million