Posts
 
Reputation
Joined
Last Seen
Ranked #630
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
6
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
5 Commented Posts
4 Endorsements
Ranked #397
Ranked #2K
~20.3K People Reached
Interests
XHTML, CSS, HTML5, CSS3, jQuery, Progressive Enhancement
Favorite Tags
Member Avatar for rsleventhal

If you change the select values to simple identifiers and then use them as object keys, this would be much easier. For example: <select id="delivery-when"> <option value="today">At some point today</option> <option value="week">Any time this week</option> <option value="year">I'm not in a rush</option> </select> <textarea id="delivery-comments"></textarea> Then JavaScript: var $when = $('#delivery-when'), …

Member Avatar for JJenZz
0
2K
Member Avatar for davy_yg

Something like this? http://jsbin.com/sisahoji/1/edit (function($) { var selector = '.attendance', $students = $(selector + '__students'), $attended = $(selector + '__attended'); function init() { $(document).on('click', selector + '__student', toggleAttendance); } function toggleAttendance() { var $student = $(this), isSelected = !!$student.closest($attended).length; $student.appendTo(isSelected ? $students : $attended); } $(init); }(jQuery)); Or if you …

Member Avatar for iamthwee
0
131
Member Avatar for devgit2810

If you have the following HTML: <p>Question one?</p> <select name="priority" class="priority"> <option value="">Select priority</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> </select> <p>Question two?</p> <select name="priority" class="priority"> <option value="">Select priority</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> </select> <p>Question three?</p> <select name="priority" class="priority"> <option …

Member Avatar for devgit2810
0
192
Member Avatar for josverhoeff

This can be done more simply as follows (although some may find harder to understand): $(document).ready(function () { $(':text').on('blur focus', function (e) { var values = ['', this.defaultValue], isFocus = (e.type === 'focus'); if (this.value === values[isFocus*1]) { this.value = values[!isFocus*1]; } }); }); I guess the main benefit here …

Member Avatar for JJenZz
0
246
Member Avatar for asif49
Member Avatar for asif49

var string = '<p>This is some text where the word T eXt will get surrounded by something else.</p>'; string.replace(/(t(\ ?)e(\ ?)x(\ ?)t)/ig, '<span class="mydiv">$1</span>'); So for your example: var html = $(document).html(), newHtml = html.replace(/(t(\ ?)e(\ ?)x(\ ?)t)/ig, '<span class="mydiv">$1</span>'); $(document).html(newHtml);

Member Avatar for JJenZz
0
247
Member Avatar for asif49

Is this what you're trying to do? str.replace(/[a-z\ ]{10,15}/g,"replacement word");

Member Avatar for JJenZz
0
554
Member Avatar for RenanLazarotto

This is not impossible to do with CSS if the elements are next to each other. It's not recommended to rely on that though in case elements get moved around but here is how it's done just as an FYI: HTML: <div class="one"></div> <div class="two"></div> CSS: .one, .two { width: …

Member Avatar for RenanLazarotto
0
2K
Member Avatar for fcvolunteer

If you are using the jQuery validate plugin then it will not try to validate fields that are disabled. Therefore, you can disable all fields when hiding them and the form will submit. I haven't tested the following but something like this appears to be what you're trying to do: …

Member Avatar for fcvolunteer
0
3K
Member Avatar for code739

You need to re-initialise the datepicker plugin on that markup for it to work because your DOM ready call only initialises it on elements that already exist within the markup on DOM ready (so not on future additions to the markup). request.done(function(msg) { msg = $(msg).appendTo('#' + cont); msg.find('.datepicker').datepicker(); }); …

Member Avatar for JJenZz
0
3K
Member Avatar for rayidi

As specified in the jQuery documentation, the error setting is... > A function to be called if the request fails. This means it is only called if there is a problem requesting `secureLogin.php`, e.g. a HTTP error such as 500 or 404 etc. Since your code isn't having trouble requesting …

Member Avatar for rayidi
0
3K
Member Avatar for kischi

There are two options... 1) Make the content of your colorbox an iframe that loads the image uploader. That way when you submit the form it will be submitting that iframe and not the whole page. <div id="form"> <!-- imageUploader.php contains your original form code --> <iframe src="imageUploader.php" width="whatever" height="whatever" …

Member Avatar for JJenZz
0
593
Member Avatar for Ajh180
Member Avatar for JJenZz
0
120
Member Avatar for LastMitch

This should achieve what you are trying to do: jQuery(function($){ //clicking prev button goes to previous slide $('.slideshow .prev').click(function() { prevSlide($(this).closest('.slideshow').find('.slides')); }); //clicking next button or image goes to next slide $('.slideshow .next, .slideshow img,').click(function() { nextSlide($(this).closest('.slideshow').find('.slides')); }); //initialize show iniShow(); function iniShow() { // show first slide with caption …

Member Avatar for LastMitch
0
450
Member Avatar for riahc3

A very stripped down version of what you're trying to do: function CrossDomainStorage() {} CrossDomainStorage.prototype = { foo: function(callback) { callback.call(this, 1, 'bar'); } } var remoteStorage = new CrossDomainStorage; remoteStorage.foo(function(key, value) { alert('inside ' + value); this.val = value; }); alert('outside ' + remoteStorage.val); The key here is to …

Member Avatar for riahc3
0
3K
Member Avatar for dany12

I'm struggling to understand what you are trying to do... which of the following? - The td background should only change colour when the last radio button out of all the radio buttons in the table is clicked. - The background colour for the radio buttons in the second column …

Member Avatar for dany12
0
447
Member Avatar for mogaka

MarPio is incorrect. Your index does not remain the same because the .each() method in jQuery (which it looks like you're using) passes the incremented index as a parameter to the callback which you seem to be well aware of by looking at your code. There is in fact nothing …

Member Avatar for JJenZz
0
107
Member Avatar for UNoHu

That is a very vague assignment and could have many answers but this would be my interpretation of it: function Automobile(make, model, colour, engine, seats) { this.make = make; this.model = model; this.colour = colour; this.engine = engine; this.seats = seats; } var myCar = new Automobile('Peugeot', '307', 'Blue', '2.6 …

Member Avatar for UNoHu
0
177
Member Avatar for LogicWeb

HTML: <span id="bible-modal-trigger">Bible</span> CSS #bible-modal-trigger { background: url(http://tinyurl.com/cawz2y3) no-repeat; position: fixed; right: 10px; bottom: 10px; width: 60px; padding-top: 65px; text-align: center; cursor: pointer; } Obviously change the background image to match yours and adjust the dimensions in the CSS. Then you just need to hook on some lightbox JS to …

Member Avatar for JJenZz
0
94
Member Avatar for drumichael87

This sounds like a clearfix issue. There are a few ways you can fix this: [code=css] #footer { color: #fff; width: 1020px; margin-left: auto; margin-right: auto; background: url(images/ourbg2.png); overflow: hidden; /* clearfix */ } [/code] or [code=css] #footer { color: #fff; width: 1020px; margin-left: auto; margin-right: auto; background: url(images/ourbg2.png); display: …

Member Avatar for drumichael87
0
129
Member Avatar for raheelmushtaq

If the issue is that you cannot bring something on top of a flash object, the solution is to add the following inside the flash <object>: <param name="wmode" value="opaque"/> This will allow elements to be positioned on top of the flash.

Member Avatar for rajarajan2017
0
114
Member Avatar for avisecjena

Haha, I opened this thread so that I could post the same thing as fxm but they beat me to it ;)

Member Avatar for peter_budo
0
85
Member Avatar for reececropley

Sounds like they just want to remove the line that hides all displayed content when a toggle is clicked. So something like this is all you need: HTML: [code=html] <div class="content hide-content"> <img src="image_big.gif" alt="image" class="toggle_font" /> <p>Caption for the image.</p> </div> <div class="content hide-content"> <img src="image_big.gif" alt="image" class="toggle_font" /> …

Member Avatar for reececropley
0
344
Member Avatar for JameB

In response to your last question, you can use JavaScript to add a 'js' class to your <html> element which you can then use to style how elements will appear when JS is enabled. To add the 'js' class to your <html> tag, you would add something like this to …

Member Avatar for JJenZz
0
301
Member Avatar for jrock2004

You need to add a callback to the URL to make it a JSONP request because you cannot do cross domain JSON requests. So to fix your code, it's as easy as adding '?callback=?' to the end of your URL. [code] $.getJSON("http://api.twitter.com/1/statuses/user_timeline/jrock2004.json?callback=?", function(data) { $.each(data, function(){ $('<div></div>') .hide() .append('<span>' + …

Member Avatar for JJenZz
0
98