Skip to content

Commit

Permalink
Resolve fisharebest#33 Javascript error in autocomplete function - Ty…
Browse files Browse the repository at this point in the history
…peError: $ is not a function
  • Loading branch information
JustCarmen committed Mar 19, 2015
1 parent 15dbe69 commit c81e979
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
20 changes: 8 additions & 12 deletions themes/clouds/clouds.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

jQuery.noConflict();

jQuery(document).ready(function ($) {
function setStyle() {
$('li.generation-block div.blockheader').each(function () {
$(this).replaceWith('<table class="blockheader" cellspacing="0" cellpadding="0"><tbody><tr><td class="blockh1"></td><td class="blockh2"><div class="blockhc">' + $(this).html() + '</div></td><td class="blockh3"></td>');
});
}
function setStyle() {
jQuery('li.generation-block div.blockheader').each(function () {
jQuery(this).replaceWith('<table class="blockheader" cellspacing="0" cellpadding="0"><tbody><tr><td class="blockh1"></td><td class="blockh2"><div class="blockhc">' + $(this).html() + '</div></td><td class="blockh3"></td>');
});
}
setStyle();
jQuery(document).ajaxComplete(function () {
setStyle();
$(document).ajaxComplete(function () {
setStyle();
})
});
})
20 changes: 8 additions & 12 deletions themes/colors/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

jQuery.noConflict();

jQuery(document).ready(function ($) {
function setStyle() {
$('li.generation-block div.blockheader').each(function () {
$(this).replaceWith('<table class="blockheader" cellspacing="0" cellpadding="0"><tbody><tr><td class="blockh1"></td><td class="blockh2"><div class="blockhc">' + $(this).html() + '</div></td><td class="blockh3"></td>')
});
}
function setStyle() {
jQuery('li.generation-block div.blockheader').each(function () {
jQuery(this).replaceWith('<table class="blockheader" cellspacing="0" cellpadding="0"><tbody><tr><td class="blockh1"></td><td class="blockh2"><div class="blockhc">' + jQuery(this).html() + '</div></td><td class="blockh3"></td>')
});
}
setStyle();
jQuery(document).ajaxComplete(function () {
setStyle();
$(document).ajaxComplete(function () {
setStyle();
})
});
})

0 comments on commit c81e979

Please sign in to comment.