Uncaught ReferenceError: hide is not defined error - javascript

I'm newbie on javascript. I'm using Twitter Bootstrap Modal.
console get me this error. why?
Uncaught ReferenceError: hide is not defined
JS
$('#te').modal(hide)

You may try this (Check the documentation):
$('#te').modal('hide');
Notice the quotes, you missed those, hide should be 'hide'.

You need to put quotes around hide.
Like this:
$('#te').modal('hide')
Reference: http://getbootstrap.com/javascript/#modals-usage

Related

Javascript Change Child node visibility to hidden in an ul

I have the following structure:
It looks like this:
I want to know how one can remove or hide "Test1" from there.
I tried using
document.getElementsByClassName('ms-core-suiteLinkList')[0].childNodes[0].style.visibility='hidden'
but it doesn't work because it says: "Uncaught TypeError: Cannot read property 'childNodes' of undefined.
Using
jQuery(".ms-core-suiteLink")[0].remove();
didn't work either.
Any help is appreciated!
You could try either
document.getElementsByClassName('ms-core-suiteLink-a')[0].style.display = 'none';
or
document.getElementsByClassName('ms-core-suiteLink-a')[0].style.visibility = "hidden";
They should do the job.

Joomla 3.7 - TinyMCE - Uncaught TypeError: Cannot read property 'replaceSelection' of undefined

This error happend when an editors-xtd plugin use the function "jInsertEditorText" with TinyMCE.
With version >= Joomla 3.7.3 (from the update of TinyMCE to 4.5.7).
For information the function "jInsertEditorText" is right, but it's the "replaceSelection" called by "jInsertEditorText" in tinymce.min.js that generate this error.
Thanks in advance for your help
I had this problem after update with phocadownload button (Joomla 3.7.5, TinyMCE 4.5.7, Phoca Download 3.0.6), there is an error on the file view.html.php, in:
/administrator/components/com_phocadownload/views/phocadownloadlinkfile
at the bottom about on line 121
insert this:
$this->assignRef('tmpl', $tmpl);
instead of:
$this->assignRef('tmpl', $this->t);
Have the same problem. I fixed it this way:
jInsertEditorText(result, 'jform_articletext');
just replace that $name with 'jform_articletext'
for me it works fine

WordPress Uncaught TypeError: Object [object Object] has no method 'live' | thickbox.js:23

In my WordPress admin area, under "Chrome Inspect Element>Console> I get
Uncaught TypeError: Object [object Object] has no method 'live' |
thickbox.js:23
When I click thickbox.js:23, this is whats highlighted
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
jQuery(domChunk).live('click', tb_click);
I get the same thing on my pages etc..
I have related this to my theme, which I've contacted them about, but no help yet.
Hoping someone could help me figure out whats happening here.
If you are using jQuery version 9.1+, try adding jQuery Migrate plugin. Add following to functions.php
add_action( 'admin_enqueue_scripts', 'admin_scripts' );
function admin_scripts() {
wp_enqueue_script('jquery-migrate','http://code.jquery.com/jquery-migrate-1.2.1.js',array('jquery'));
}

JQuery highlight won't work

I'm using JQuery to use a highlight effect as discribed on the docs side of JQuery itself.
JQuery HighLight
But when using this on a tr or td element, I'm getting this exception:
Uncaught TypeError: Object [object Object] has no method 'effect'
I tried to use a simple effect like hide() and that effect did work.
Could anybody help me out here? What am I missing here?
This is the code I'm using:
$('.small_form').live "ajax:success", (event, xhr)->
$(#).parents('tr').effect("highlight", {}, 3000)
It is in coffe script, I also made sure the ajax request works. Because I got other effect working using this event.
Add this into your page after loading jQuery.
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
The effect method is part of jQuery UI, and is required when trying to use it!

jQuery UI Slider giving: Uncaught Syntax error, unrecognized expression: #

I am trying to use the jQuery slider plugin but it keeps giving the JavaScript error:
Uncaught Syntax error, unrecognized expression: #
Here is the script:
http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/
You can view a demo here:
[link-removed]
Any ideas?
Thanks.
I figured out the problem. The plugin you're using to convert the slectbox to the slider requires the selectbox to have an id attribute.
Simply add id="slider" to the selectbox and it should work.

Categories

Resources