Question: I have read [this](http://entityframework.codeplex.com/wikipage?title=Custom%20Conventions) documentation about convention in Entity Framework 6. But it does not contain convention for Relationship. 

Suppose I have following model:

```
[TablePrefix("mst")]
public class Guru
{
    public int Id { get; set; }

    public int? IdKotaLahir { get; set; }

    public virtual Kota KotaLahir { get; set; }
}

```

I want property `IdKotaLahir` to be foreign key of navigation property `KotaLahir`.
Foreign key name is `"Id"+<NavigationPropertyName>`.
Is it possible using current version of entity framework (EF 6 alpha 3)?

Answer: 
Not sure if I understand what you are going for... but would using :after work?

```
.card {
    position: relative;
}
.card:after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: black;
}
.card:hover:after {
    display: none;
}

```

Example: <http://jsfiddle.net/29TCZ/>

You could replace :hover with a class and toggle it as required.
firstly, you cannot change div's `background-color`, without changing its CSS `background-color` property. How could you?

Guessing what you want is to maintain last background-color (for some action or to swap it back), then save it in some hidden input variables.

And then, you can use it to display anywhere you want.

Also, if you want to grab the `background-color` property and show it `as a text` on the div, you can do that very easily.

```
var color = $('#selector').css('backgroundColor');

```

, but it will return you RGB value. if you want hex,

use this handy methods:

```
var hexDigits = new Array
        ("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"); 

//Function to convert hex format to a rgb color
function rgb2hex(rgb) {
 rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
 return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}

function hex(x) {
  return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];
 }

```

taken from [here](https://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-jquery)

Update,
=======

currently your `divs` are like this:

```
<div id="a1" class="card"></div>
<div id="a2" class="card"></div>
<div id="a3" class="card"></div>
..
..

```

and since you want to assign a secret color to each of these divs
update them through javascript, inside your while loop, to make them like this:

```
 <div id="a1" class="card" data-color-index="1"></div>
 <div id="a2" class="card" data-color-index="2"></div>
 <div id="a3" class="card" data-color-index="3"></div>

```

now, you when you click on a particular div, grab its index and choose that item from the `colors` array of yours. since, you are `splicing` your original array, i had to make a copy of it, to use it later.

you can grab any element's attribute `data-color-index` through jquery like this:

```
   $('#selector').data('color-index');

```

see this [fiddle](http://jsfiddle.net/manishmishra121/WJQkA/7/). it does what you want to do