How to change node id in drupal 7? I'm very new to drupal. I'm using drupal 7 with ckeditor. I've created one block with 3 views (Link, Image, Link) in it and I've wrote jQuery on 2 links. Then, I've developed second block with same type of views and wrote same jQuery for 2 links in this new block.

But I found (in FireFox using FireBug addon) that all links have same node id. views-field-view-node for 1st link and views-field-view-node-1 for second link for both blocks. So when I click on 1 block's 1st link, action fires in both blocks because drupal received same link id for another block also.

How can I change/modify this node id of view? So I can give separate action.

Used jQuery:

drupal_add_js("jQuery(document).ready(function() {
    // change slideshow with your view name
    jQuery('.view-slideshow .view-content').cycle({
        fx: 'fade',
        speed:  'fast', 
        timeout: 3000, 
        next:   '.views-field-view-node-1', // problem is here. This id is same for both block's link
        prev:   '.views-field-view-node' 
    });
});", 'inline');


Thanks in advance....
This is not a Drupal related problem.

Your 'next' and 'prev' selectors are not specific enough. You should write also the parent block id. 

Every block in a page has a unique id attribute in HTML. You should find stuff like

&lt;div id="block-3" class="block"&gt;


wrapping your slideshow.

Just declare a more specific jQuery selector, adding the block id.

Here's a modification for your code, assuming that the block has a "block-3" id:

drupal_add_js("jQuery(document).ready(function() {
    // change slideshow with your view name
    jQuery('.view-slideshow .view-content').cycle({
        fx: 'fade',
        speed:  'fast', 
        timeout: 3000, 
        next:   '#block-3 .views-field-view-node-1', // added a 'parent child' jquery selector
        prev:   '#block-3 .views-field-view-node' 
    });
});", 'inline');