If you want to know all your ids, you need a loop, for example:
var b = $('[id*="Partial_"]');
b.each(function() {
console.log(this.id);
});
This loop can be in your code (as indicated above) or in jQuery code:
var ids = $('[id*="Partial_"]').map(function() { return this.id; }).get();
id s.
, , id "Partial_", ββ ^=, *=. *= ; ^= id.
each, map:
var b = $('[id*="Partial_"]');
snippet.log(b.length + " found using `*=`:");
b.each(function() {
snippet.log(this.id);
});
snippet.log("As an array: " + b.map(function() {
return this.id;
}).get().join(", "));
snippet.log("---");
b = $('[id^="Partial_"]');
snippet.log(b.length + " found using `^=`:");
b.each(function() {
snippet.log(this.id);
});
snippet.log("As an array: " + b.map(function() {
return this.id;
}).get().join(", "));
<div id="Partial_1"></div>
<div id="Partial_2"></div>
<div id="Partial_3"></div>
<div id="blah_Partial_foo"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://tjcrowder.imtqy.com/simple-snippets-console/snippet.js"></script>
Hide result