Apparently there was a conflict in the complex string
$("#mb-socialimg").val(wp.media.attachment(attachment.id).get("url")+"|"+attachment.id);
I changed to the following and now it all works well
$("#mb-socialimg").val(attachment.url+"|"+attachment.id);
Related Posts:
- How to handle multiple instance of “send_to_editor” js function
- Using Underscore Templates in WordPress
- Modify Custom Field in Media Library using JavaScript
- Media manager multiple selection
- Adding fields to the media uploader with jquery listeners
- jQuery Validate wp_editor
- trigger(‘change’) not working
- Edit single attachment on click (WP-admin)
- Is it possible to hide media details sidebar when wp.media popup is being opened?
- `wp_editor()` CSS messing up the jQuery Dialog
- Passing jQuery into the WordPress media uploader
- Dynamicaly update field created with wp_editor()
- jQuery does not work on WordPress editor
- how to use wp_editor() here am getting empty result
- Dynamic WordPress editor in meta box
- Visual editor popover or placeholder
- WP Media Uploader modal conflicts with Bootstrap modal
- How to send multiple data fields via Ajax?
- Adding an onclick function to go to url in JavaScript?
- Download File Using jQuery
- Jquery Ajax Posting JSON to webservice
- correct way of comparing string jquery operator =
- Jquery to change form action
- Split string in jquery
- Detecting value change of input[type=text] in jQuery
- Javascript : array.length returns undefined
- Comparing dates in jquery
- jQuery: using a variable as a selector [duplicate]
- Slide right to left?
- Correct Method to run scripts with dependencies without enqueue?
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- ‘Add Media’ button doesn’t work when editor is initialized from javascript
- How to get a jQuery script to run on a page?
- Loading jQuery With Two Fallbacks
- Moving jQuery to the footer without using de-register in WordPress
- Best approach for loading a sidebar Only if the screen max-width is >900px?
- Localize variable for multiple Shortcodes
- Including jQuery in WordPress
- Prevent five different copies of jquery from being included on every page
- javascript is not working on Event Submission?
- WordPress audio player causing js error, mediaelementplayer is not a function
- How to get a value from PHP in Jquery through Ajax
- Script for initializing JQuery Masonry for WordPress
- Correct way to write jQuery functions in WordPress
- Use jQuery to conditionally hide elements in Quick Edit
- AJAX Loaded Glossary like Search results with links to other entries from custom table
- Trouble with WordPress Ajax Login System – 302
- Why does javascript works only if logged in?
- Load the next posts ajax
- How does WordPress handle HTML Tables interaction with jQuery
- Problem passing id-specific objects to javascript via wp_localize_script
- I am trying to modify a plugin and am adding Jquery, but it does not seem to be executing
- FacetWP – conditionally display facet labels
- Callback After WordPress Customizer Complete Loading
- Creating a new div onclick wordpress+ajax
- Uncaught ReferenceError: jQuery is not defined . How do I define it correctly?
- Close Fancybox, sumbit form data and redirect
- Properly embed javascript into WP (using function.php) – doesn’t work?
- jQuery tabs plugin with callback to fetch data
- jQuery is not defined [closed]
- Nested Gallery Shortcode INTERMITTENTLY working
- Best way of getting a a series of custom fields into an array?
- JQuery UI not loading without explicit loading of jQuery
- Is it OK combined wp-include js, jquery, css? [closed]
- Including Older Version of jQuery for IE7/IE8
- Why won’t the Jquery validation plugin work?
- JQuery load php – php file without the template
- Uncaught TypeError: Object # has no method ‘datepicker’ [closed]
- Making jQuery-based galleries with WordPress without a plugin?
- JS behavior differs depending on page tree [closed]
- Long contextual help needs two clicks to close
- jQuey Popup no longer working
- Is textarea always accesible throught textarea#content in wordpress dashboard for a specific page?
- How can I get this menu container to be the height of the contents?
- JQuery is not working after complete load of the page
- Carousel Slider For Custom PHP Snippet Is Not Working
- why does so many javascript libraries are loaded along with my website?
- Why does my media selection script write to ONLY the first input field?
- Modify the href attribute of tag dynamically in WordPress
- Add a jQuery snippet for sepcific user role
- Move jQuery on *top* of footer
- How to specify url for ajax call in wordpress plugin
- Call admin ajax using absolute url? Relative URL breaks (frontend ajax)
- Dynamic image grid gallery
- Responsive framework – edit child js
- Page keeps refreshing with Ajax form
- JS script not being included [closed]
- jquery issue in functions.php
- JS plugin script loading but not working
- WP Calendar Shortcode not working on my theme
- Are you sure popup on Contact Form 7 [closed]
- change the icon of a custom post type in WordPress to use twitter boostrap
- Using jQuery toggle() in WordPress post to show/hide Tweet button?
- Call a Simple JQuery from within Flash
- Ajax request with jQuery without WP_ajax
- JQuery WordPress gallery [closed]
- JS file not loading [closed]
- How can insert JQuery in WordPress? [closed]
- I need a Pop up with description when i click an image
- Jquery in IE, fully messed up