Skip to content

How to use dynamic id based this plugin ? #42

@ravindrababuvidya

Description

@ravindrababuvidya

This Plugin is working static data $('#zoom1').anyThingZoomer({});
but when dynamic id based how i will use i tried getting id and puting that id $('#'+id+' ').anyThingZoomer({}); not working perfectely please help me anything i did wrong correct me.

<div class="row">
  <div class="col-sm-4 cart" id="zoom1">
      <div class="small img-div">
            <img src="demo/fbofw.jpg" > 
      </div>
  </div>
  <div class="col-sm-4 cart" id="zoom2">
        <div class="small img-div">
                <img src="demo/fbofw2.gif" > 
          </div>
  </div>
  <div class="col-sm-4 cart" id="zoom3">
        <div class="small img-div">
                <img src="demo/fbofw3.gif" > 
        </div> 
  </div>
</div>
$(".cart").mouseover(function(){
    // alert("id"+$(this).attr('id'));
    id = $(this).attr('id');
    console.log("id"+id);
    hitMouseOver(id)

});
function hitMouseOver(id){
    // alert($('#'+id+''));
    $('#'+id+'').anythingZoomer({})
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions