Find text in jquery

Below is our HTML,
 
<div>One Two</div>
<div>Three Four</div>
<div>Two Four Five Six</div>
 
We will now change the background of the div's having Two in it using below code,
 
$( "div:contains('Two')" ).css( "background-color", "green" );
 
 
 

Can't start Eclipse - Java was started but returned exit code=13

First of all see if you have installed Java JDK on your system, if not then head to the below link and get it installed, if yes get it reinstalled.

JDK Download

After this try tiy to open Eclspse, it should open by now.

If you still get the same error message, go and change the path variables.

To do so go to the MyComputer->Properties-> And click on Advanced System Settings

It will open "System Properties" window.

How to enable mod_rewrite Module on Ubuntu in Apache for Drupal

To enable clean, go to http://localhost/yourDrupalProject/?q=admin/config/search/clean-urls.
Take clean URL test, if it fails then follow these instruction,
 
    1. Open  terminal and typin "a2enmod rewrite" , It will enable your mod_rewrite module for Apache.
    2. Then go to "/etc/apache2/sites-available" and edit default file.(For this you must have writable permissions to this file and sites-available folder.)
    3. Replace below with existing lines 4 to 14&n

Insert a block into a node or template in Drupal 7

To print the block you can use below code,

$addblock = module_invoke('addthis','block_view','addthis_block');
print render($addblock['content']);

addthis = "module_name" = This is module name can be found in block configuration URL or the name of the module's folder

block_view = Type of view

addthis_block = "block_delta" = This can also be found in the block configuration URL

*Configuration URL = Open blocks page in Drupal 7 which is "admin/structure/blocks", and click on "configure".