This is my HTML ActionLink helper in the view:
<%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, "Edit", Model.ContentType.ToString(),
new {slug = Model.Slug, modal = true},
new {
rel = "shadowbox;height=_HEIGHT_;width=_WIDTH_",
title = Resources.Localize.Routes_WidgetsEdit,
@class = "editWidget"
})%>
It renders out this HTML
<a href="/Tab/Edit/tab-slug/tabgroup-slug?modal=True" rel="shadowbox;height=_HEIGHT_;width=_WIDTH_" title="Edit tab">Edit tab</a>
What I would like to do is insert dynamic values for HEIGHT and WIDTH, in JavaScript I get them like this:
<script type="text/javascript">
var width = $(window).width();
var height = $(window).height();
</script>
Now I need a jQuery selector or command to select the "rel" attribute of all the links on page that are wired up to Shadowbox (see shadowbox value in rel) and if they contain shadowbox and HEIGHT and WIDTH replace those two placeholders with actual values at runtime. The solution should be quite bulletproof.
Hopefully this will be a piece of cake for all you jqueryists out there. ;)