0

I've a situation where i should integrate the check boxes with custom html and also in turn i need all the functions of normal checkbox.

Can you guide me how to do that? I'm new to jquery..

2 Answers 2

2

I'd ignore the html checkbox altogether for this design. I'd build a graphics element (the blue overlay) which becomes visible when you click the image, and invisible if clicked again. For input, in every div like this, you should put an <input type="hidden" value="0">, and with jQuery set the relevant input's value to 1 when the overlay is on, and to 0 again when it's off.

Let me know on which part exactly you're having a problem, I'll try to elaborate. Hope it helps.

Here's a jsFiddle

Sign up to request clarification or add additional context in comments.

2 Comments

I thought of checkboxes because whenever i click invite , each div should have a userid which i thought that can put as a value for checkbox with the same name and when i post them i can get a array of checked checkboxes value.. I need in help in having a checkbox and then linking them with the html i have(so when i select this image the checkbox should be checked and vice versa)t
added a jsFiddle with an example to the answer
1

have following structure and when <a> is clicked changed the checkbox value using JavaScript. add the image and text to the span.

<span>
  <a href="#"></a>
  <input type="checkbox" name="chbox">
</span>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.