-2

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,258
  • 6
  • 34
  • 42

3 Answers3

3

Try this

   function share22() {
      if(!isOneChecked('choice')) {
       alert('Please select the file..');
       return false;
      }
      $("#share_popup").css("display", "block");
   }
Satpal
  • 132,252
  • 13
  • 159
  • 168
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
  • 31,145
  • 9
  • 53
  • 73
0
function share22() {
    if(!isOneChecked('choice')) {
        alert('Please select the file..');
        return false;
        }
       $('#share_popup').css("display","block");
       }
joelhoro
  • 890
  • 1
  • 9
  • 20