Pure css close button

I spent more time on this than I should have, and haven’t tested in IE for obvious reasons. That being said, it’s pretty much identical. http://jsfiddle.net/adzFe/14/ a.boxclose{ float:right; margin-top:-30px; margin-right:-30px; cursor:pointer; color: #fff; border: 1px solid #AEAEAE; border-radius: 30px; background: #605F61; font-size: 31px; font-weight: bold; display: inline-block; line-height: 0px; padding: 11px 3px; } .boxclose:before { …

Read more

Pass variable to function in jquery AJAX success callback

Since the settings object is tied to that ajax call, you can simply add in the indexer as a custom property, which you can then access using this in the success callback: //preloader for images on gallery pages window.onload = function() { var urls = [“./img/party/”,”./img/wedding/”,”./img/wedding/tree/”]; setTimeout(function() { for ( var i = 0; i …

Read more

Selecting option by text content with jQuery

Replace this: var cat = $.jqURL.get(‘category’); var $dd = $(‘#cbCategory’); var $options = $(‘option’, $dd); $options.each(function() { if ($(this).text() == cat) $(this).select(); // This is where my problem is }); With this: $(‘#cbCategory’).val(cat); Calling val() on a select list will automatically select the option with that value, if any.