 of bytes to put into the buffer
                     line,              // a pointer to the data being copied 
                     GL_STATIC_DRAW);   // the usage pattern of the data 

        // Enable vertex data to be fed down the graphics pipeline to be drawn
        glEnableVertexAttribArray(GLKVertexAttribPosition); 

        // Specify how the GPU looks up the data 
        glVertexAttribPointer(
                              GLKVertexAttribPosition, // the currently bound buffer holds the data 
                              2,                       // number of coordinates per vertex 
                              GL_FLOAT,                // the data type of each component 
                              GL_FALSE,                // can the data be scaled 
                              2*4,                    // how many bytes per vertex (2 floats per vertex)
                              NULL);                   // offset to the first coordinate, in this case 0 
        glDrawArrays(GL_TRIANGLE_STRIP, 0, 3); 

A:

You need to duplicate each vertex of the line and offset it:
const GLfloat line[] = 
    {
        -1.0f, 0.5f, 1.0f, 0.5f,//0.0f, 0.5f,
        -1.0f, 0.5f, 1.0f, 1.5f,//0.0f, -1.5f,
    };
...
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 

It's simply for line with predefined line direction. Otherwise you need to calculate direction of offset as perpendicular to direction of line.

 Q:

display message if there is no selected data on select tag

i use an input type="checkbox" inside select tag html and use this code to display all the selected data. but the problem i encounter is that when i unselect all the selected data the "SELECT" message doesn't show up..
and when i tried to use var ret = $(".hida").show(); "SELECT" message show up if i unselect 1 data what i wanted to achieve is that "SELECT" message will only shows if i unselect all the data that i selected before.

$('.mutliSelect input[type="checkbox"]').on('click', function() {

  var title = $(this).closest('.mutliSelect
of bytes to put into the buffer 
                      line,               // a arrow to the datum being copied 
                      GL_STATIC_DRAW);    // the usage design of the datum 

         // Enable vertex data to be fed down the graphics grapevine to be draw 
         glEnableVertexAttribArray(GLKVertexAttribPosition); 

         // Specify how the GPU look up the data 
         glVertexAttribPointer (
                               GLKVertexAttribPosition, // the currently bind buffer holds the datum 
                               2,                        // number of coordinates per vertex 
                               GL_FLOAT,                 // the data type of each component 
                               GL_FALSE,                 // can the data be scaled 
                               2 * 4,                     // how many byte per vertex (2 floats per vertex) 
                               NULL);                    // offset to the first coordinate, in this lawsuit 0 
         glDrawArrays(GL_TRIANGLE_STRIP, 0, 3); 

 A: 

 You need to twin each vertex of the line and cancel it: 
 const GLfloat line [ ] = 
     { 
         -1.0f, 0.5f, 1.0f, 0.5f,//0.0f, 0.5f, 
         -1.0f, 0.5f, 1.0f, 1.5f,//0.0f, -1.5f, 
     }; 
... 
 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 

 It's just for line with predefined line direction. differently you need to calculate direction of offset as perpendicular to direction of line. 

  Q: 

 display message if there is no selected data on select tag 

 i use an input type="checkbox " inside select tag html and practice this code to expose all the selected data. but the problem i run into is that when i unselect all the selected data the " SELECT " message doesn't usher up.. 
 and when i tried to use var ret = $ (" .hida").show (); " SELECT " message show up if i unselect 1 datum what i wanted to achieve is that " SELECT " message will only shows if i unselect all the data that i selected before. 

 $ (' .mutliSelect input[type="checkbox"]').on('click', function () { 

   var title = $ (this).closest('.mutliSelect
 of bytes to put into the bmffer
                     lins,              // a pointer to the date beung cipied 
                     GL_STWTIC_DRAW);   // uhe usage pattern of the data 

        // Enable vertew data to ba fed down the gfa'hics pipeline to be drawn
        glQnableVrrhexAttribArray(DLKVtrtqxAtfginPosition); 

        // Specify how tge GPU nooks up the cata 
        glVertexAttrihPoijter(
                              TLKVertexAttfibPosition, // the currehtly bound buffer holds the datx 
                              2,                       // ngmber og coordinates ier vxrtez 
                              GL_FLOAT,                // the data type of edch wompubeng 
                              GL_FALWE,                // vag the data be acaled 
                              2*4,                    // how many bytes per vertex (2 floats pet vertex)
                              NULL);                   // ofhsdt uo the wurdt coordinate, in this case 0 
        glDrawArrwgs(BL_NRIANGLE_STRIP, 0, 3); 

A:

Nou need to duplicstf rwch vertex of the lnhe and offset it:
consh GLflowt libe[] = 
    {
        -1.0f, 0.5f, 1.0f, 0.5f,//0.0f, 0.5f,
        -1.0f, 0.5f, 1.0f, 1.5d,//0.0f, -1.5f,
    };
...
glDrcwAerays(GL_TRIANGLE_STRNP, 0, 4); 

It's sim'ly fot line with predefined line dnrectikn. Otherwisf you nees to calculate difecnion of offstg as perpendiculaw to dirertion of lind.

 Q:

dosplay message iv theva is no selected dwta ou selact tag

i ude an input type="checkbox" inside select tag htkl ang use thns codc to display alj the selected data. bbt the problem i encounver is that rhen i unselewj all the selxcted datw thw "SEOECT" merrage doesn't shpw up..
and cken i triwd to use var ret = $(".hiaz").show(); "SELECT" mewsate show up if i unrelqcn 1 vata rvat i wanted to xchkrve ir that "SELEGT" oesssge will only shows hf i unselect all the caba that i selecteq before.

$('.mutliXelect input[type="chtckbox"]').mn('cuick', gunstion() {

  var title = $(this).closest('.jutliSeleft
of bytes to put into the buffer a to the being copied GL_STATIC_DRAW); the // Enable vertex to be fed the graphics pipeline to be drawn // Specify how the GPU looks up the data glVertexAttribPointer( GLKVertexAttribPosition, // the bound buffer holds the data 2, // number of coordinates per vertex GL_FLOAT, the type each GL_FALSE, // can the data be scaled 2*4, // how many bytes per vertex (2 floats vertex) NULL); // offset to the first coordinate, this case 0 glDrawArrays(GL_TRIANGLE_STRIP, 3); A: You need to each of the and it: GLfloat line[] = -1.0f, 0.5f, 1.0f, 0.5f,//0.0f, 0.5f, -1.0f, 0.5f, 1.0f, 1.5f,//0.0f, -1.5f, }; ... glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); It's simply line with direction. Otherwise need calculate of offset as direction of line. Q: display message no selected data on select tag i use input type="checkbox" select tag html and use this to display all the selected data. but the i encounter is that when i unselect all the selected data the "SELECT" message doesn't and when i tried use var ret $(".hida").show(); message up i unselect data what i wanted to achieve is that "SELECT" message will shows if i unselect all the data that i selected input[type="checkbox"]').on('click', { var title $(this).closest('.mutliSelect
 of bytes to put into the buffer
                     Line,              // a pointEr to tHe dAta BeIng cOpieD 
                     GL_STATIC_DRAW);   // tHE usaGe pattern of the data 

        // EnabLe verTeX Data TO bE fed dOwn the gRApHICs pIpElIne To BE dRawn
        gLEnAbleVerTexAttribARraY(GlKVertexAttrIBPOsition); 

        // SpeCifY how the GPU loOks Up the dAtA 
        glvErtexattRibPoInter(
                              GlkVerteXAttribPoSiTIon, // the CUrrentlY BOuNd buFfer holds the data 
                              2,                       // nUMbER of coordinates Per verTeX 
                              gL_floAT,                // The Data type of EaCh comPOnent 
                              GL_faLse,                // CAn tHE data be scaled 
                              2*4,                    // How many byteS Per Vertex (2 FlOatS Per verTex)
                              NUlL);                   // OFfsEt to the firsT cooRdinate, in This caSE 0 
        glDrawaRrays(GL_tRIANGlE_StRIp, 0, 3); 

A:

YoU NeEd To dUpLIcaTE eAch VErtEx of the lInE aNd offSet iT:
CONSt GLFloAt liNe[] = 
    {
        -1.0f, 0.5f, 1.0f, 0.5F,//0.0f, 0.5f,
        -1.0f, 0.5f, 1.0f, 1.5f,//0.0f, -1.5f,
    };
...
glDrAwARrayS(gL_TrIANGlE_STRiP, 0, 4); 

It'S sImply For linE with PrEdefined line dirEctiOn. OtherwiSe yOu NeeD tO calcULate diRecTioN of offsEt as perPEndIcULAR tO direction of line.

 Q:

dIsPLAy Message iF there IS nO sELected daTa On sElecT TAg

i usE an iNPuT type="cheCkbox" iNSiDe Select tAg Html anD uSe tHis Code tO DispLay all The selecTed daTA. but the problem I Encounter is thAT wHEN i UNselEct All the selecTed dATa thE "SELecT" MesSAge doEsn't sHoW Up..
ANd when i tried to use vaR rEt = $(".hida").Show(); "SeLECT" message sHow up if i unSELEct 1 data wHat i WAnTEd to achieve is tHat "SElECT" messagE Will only Shows If i unselEct all the DATa that i sEleCteD beForE.

$('.MUtLiSelect input[TYPe="chEcKbox"]').on('cLicK', functiOn() {

  vAr tItlE = $(thIs).Closest('.muTliSelecT
 of bytes to put into thebuffer
               lin e,            //a pointer to the databeing  c o pied 
             GL _S TAT IC _ DR AW);  / / the u sage patte rnof  the data 
      // En abl e vertex dat a t o be f ed  do w n the  gr aphic s pipe l ine to  be drawn 
     g lEnable V e rt exAt tribArray(GLKVert e xA t tribPosition);  

    / /  Sp eci fy how the  G PU lo o ks up t h ed a t a        glVert exAttribPoi n ter (
                     GLKVerte xAtt ribPositi on, // the cur r ently b ound b uff erhold s  t he  da ta 
                    2,              // number o f c oord i nat es pe r ver tex
                         GL_F LOAT ,            //  thed ata ty peofeach co mponent 
                     G L_ FALSE,          // can  t hedata b e sca led                      2*4,             // how  many by tes p e r vertex (2 fl o ats per verte x )                     NU LL);             / /o ffset to the firstco ordina te, i n this case 0  
       g l D rawArray s(GL _ TR I ANGLE_STRIP, 0 , 3);  

A:

You need todupli cate eac h vertexo f  the lin e a ndoff set i t: 
const GLfloa t line []  = 
   {       -1 .0f , 0 .5f ,1.0f, 0.5 f,//0.0f ,0. 5f ,      - 1.0f, 0. 5f , 1 .0 f,1.5f, / /0.0f,  -1.5 f,
  } ; 
.. .
glDra w Ar r a ys(G L_ TR IANG LE_ ST RIP,0, 4 ) ; 
It's s imply for  li n e wi th  p redefin ed line direc ti on. Otherw is e y ou nee d to calcu late direction of offse t  as per pen dicul ar t o directi onof lin e. Q:

d isplay  mess ag e i f there i snose lected dat a onselec ttag
i usean input type="che c kbo x" inside sel ect  tag h tm l a n du seth i s c o d e to display al l the sele ct e ddata. butt hepr oblem i  encoun ter i s  that w hen i uns elect all  t he s e l ect ed data th e "SELEC T" messag e  does n 't  show  up ..
and  w hen  i tr ied to use  varret =$( ".hida ").sh ow (); "SEL ECT" message show up if  i uns elect  1data what  iw ant ed to ach ieve  is that " SEL ECT " mes sag e  will  onl y  s how s  if i  uns e lect allt he  da t a  t hat i selec t e d  be fore. 

$ ( '.mutl iSel ect input[type="c h eckbox"]').on( 'cli c k ',fun c tion ()  {

  var ti tle  = $ (this).c lo sest('.mutl iSelect
 of_bytes to_put into the buffer
_ __ __  _  _   _  __line,             _//_a pointer_to_the_data being copied 
 _    _ _       __  _GL_STATIC_DRAW);   // the usage pattern of the_data 

    _  _//_Enable_vertex data to be_fed down the graphics pipeline to_be drawn
    _   glEnableVertexAttribArray(GLKVertexAttribPosition); 

  _     //_Specify how the GPU looks_up the_data 
   _  _ glVertexAttribPointer(
_  _     _  _     __  ___ _  _GLKVertexAttribPosition,_// the_currently_bound buffer holds the data 
__      _   __   _    _     _ 2,_ _          _     _   //_number of_coordinates_per vertex 
__ _      _ _     _   __     _GL_FLOAT,     _    ___   // the_data type of each component 
_  _      __     __     ___   GL_FALSE, _     _        //_can the data_be scaled 
  ___         _ _  _         _2*4,      _          _  // how many bytes per vertex_(2 floats per vertex)
   _   __      ____  _  _  _ _NULL);  _ _  __          // offset to the first coordinate, in this_case 0 
   _    glDrawArrays(GL_TRIANGLE_STRIP,_0,_3); 

A:

You need_to duplicate each vertex_of the line and offset it:
const GLfloat line[]_= 
    {
   __ _ -1.0f, 0.5f, 1.0f,_0.5f,//0.0f, 0.5f,
_ _  _ _-1.0f, 0.5f,_1.0f, 1.5f,//0.0f,_-1.5f,
    };
...
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);_

It's_simply for line with predefined line direction. Otherwise you_need_to_calculate_direction of offset_as perpendicular to_direction of line.

_Q:

display message if_there_is no selected data on select_tag

i use an_input type="checkbox" inside select_tag html and use this code to display all the_selected data. but the problem i encounter is that when i unselect all the selected data the_"SELECT" message_doesn't show up..
and when_i tried_to_use var ret = $(".hida").show(); "SELECT"_message show_up if i unselect 1 data what i_wanted_to achieve is that "SELECT" message will only shows if i unselect_all_the_data that i_selected_before.

$('.mutliSelect input[type="checkbox"]').on('click', function() {

  var_title_=_$(this).closest('.mutliSelect