I am trying to modify the page to be read from XML, not the DOM, and I would prefer not to use $ (xml) .find ('blah') for each individual call, and I was wondering if there is a way to specify jQuery in xml rather than DOM
For example, I would like to be able to move my xhtml using the jQuery method as such: $ ('Blah'). That
Is it possible?
No, you cannot redirect the global object documentto an arbitrary DOM document that you created.
document
jQuery context $() , :
context
$()
$('blah', xmlDoc).whatever()
var, , , :
var $xml = $(xmlDoc); $xml.find('blah').foo(); $xml.find('bloh').bar();
, $:
$
var old$ = $; var xml = ...; $ = function(arg) { return old$(arg, xml); }
, ... ...
jQuery.ajax() jQuery.get() DOM , / "json" "xml".
http://docs.jquery.com/Ajax/jQuery.ajax#options ( "dataType" )
Source: https://habr.com/ru/post/1718743/More articles:Saving multiple selection values ββin a database - sqlWhat is the current state of memory protection? - memory-managementHow to enable logging for the NServiceBus public node - log4netIs this the right way to create / destroy a line in a loop? - objective-cVerifying CAcert Certificate in C # - c #.NET Regular Expression to Create STRONG Password - regexgeneral php session - phpWin32 API Data Type Naming Conventions Guide - winapiscript / generate on Windows: 'script' is not recognized as an internal or external command - windowsDownload data and show the screensaver - c #All Articles