-1

I have a javascript code like this:

function share22() {
    if(!isOneChecked('choice')) {
        alert('Please select the file..');
        return false;
        }
       document.getElementById('share_popup').style.display="block";
       }

I want to convert this dialog into simple jquery so that I can edit the title.

user1881957
  • 3,006
  • 4
  • 33
  • 41

3 Answers3

3

Try this

   function share22() {
      if(!isOneChecked('choice')) {
       alert('Please select the file..');
       return false;
      }
      $("#share_popup").css("display", "block");
   }
Satpal
  • 129,808
  • 12
  • 152
  • 166
1

Considering if(!isOneChecked('choice')) { is checking for check box is checked or not

  function share22() {
     if ($(".choice").is(":not(:checked)")){
       alert('Please select the file..');
       return false;
     }
     $('#share_popup').show();
   }
Prasanth Bendra
  • 29,105
  • 8
  • 50
  • 70
0
function share22() {
    if(!isOneChecked('choice')) {
        alert('Please select the file..');
        return false;
        }
       $('#share_popup').css("display","block");
       }
joelhoro
  • 820
  • 8
  • 19