Question: I have the following:

```
editCity: "/Admin/Citys/Edit?pk=0001I&rk=5505005Z"

$('#editCity')
    .attr('title', "Edit City " + rk)
    .data('disabled', 'no')
    .data('href', editCity)
    .removeClass('disabled');

```

When I check the HTML with developer tools I see this:

```
<div class="button dialogLink" id="editCity" 
data-action="EditCity" data-disabled="yes" 
data-entity="City" title="Edit City 5505005Z" ></div>

```

Everything is updated except the href. Anyone have an ideas what I am doing wrong?

Answer: 
Use

```
var editCity = "/Admin/Citys/Edit?pk=0001I&rk=5505005Z";

```

What you did was a [labeled statement](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/label), consisting only of a string literal and missing a semicolon.

---

Btw, jQuery's [`.data()` method](http://api.jquery.com/data/) is not to be used for data-attributes, but just for associating JS objects with DOM elements.
I think jQuery stores the data internally if they don't exist the first time you set them. If you really want to force it:

```
$("#editCity").attr("data-href",editCity)

```