jquery - Selecting the child of a block in a plugin -


i'm working on plugin right , can't work.

i want make container this one

if click on block, cover should move specific direction.
every time want child of .coverframe-container, gives me link of file + ' > .cover'

here code:

$.fn.coverblock = function () {     // settings     var settings = $.extend({         direction: 'up',         speed: 400     });      $(this).click(function () {         element = this;         console.log(this + ' .cover');     }); }  $(function () {     $('.coverframe').coverblock(); }); 

this in debug now.

the console-log in click-function gives me this:

file:///g:/wamp/www/training/index.html# .cover  

without addition +' .cover' gives me following:

<a href="#" class="coverframe" style="display: block; height: 100px; width: 100px;">...</a> 

how can fix can select child , work it?

try using $(this) within click function.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -